Skip to content

Build instructions

Tudor Brindus edited this page May 31, 2024 · 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.14.0 OCaml compiler
opam switch create magic-trace 4.14.0
eval $(opam env --switch=magic-trace)
  1. Clone the magic-trace repo
git clone https://github.com/janestreet/magic-trace.git
cd magic-trace
  1. Install dependencies
opam install ocamlformat.0.26.2
opam install ./magic-trace.opam --deps-only
  1. Build, test, and autoformat it
dune build @default @runtest @fmt --auto-promote
  1. Run it
_build/default/bin/magic_trace_bin.exe -help