Skip to content

Build instructions

Tudor Brindus edited this page Mar 25, 2022 · 21 revisions

Magic-trace is written in OCaml. It uses opam as its package manager, and dune as its build system.

  1. Install opam
bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)"
opam init --bare
  1. Select the 4.13.1 OCaml compiler
opam switch create 4.13.1 4.13.1
eval $(opam env --switch=4.13.1)
  1. Add the ability to fetch some extra dependencies
opam repo add janestreet-bleeding https://ocaml.janestreet.com/opam-repository
  1. Clone the magic-trace repo
git clone https://github.com/janestreet/magic-trace.git magic-trace
cd magic-trace
  1. Install dependencies
opam install ./magic-trace.opam --deps-only
opam install ocamlformat
  1. Build, test, and autoformat it
dune build @default @runtest @fmt --auto-promote
  1. Run it
_build/default/bin/magic_trace_bin.exe -help
  1. Set up your editor.

  2. Hit up the issue tracker to find a bug to work on.