Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 1.65 KB

File metadata and controls

68 lines (46 loc) · 1.65 KB

Local Setup

If you already have opam installed and initialized, create these three switches instead of using a devcontainer.

ocaml switch

Standard OCaml 5.4.0 with tutorial dependencies.

opam switch create ocaml ocaml-base-compiler.5.4.0 --yes
eval $(opam env --switch ocaml)
opam install -y dune ocaml-lsp-server merlin utop alcotest dscheck qcheck-stm qcheck-lin

ocaml+tsan switch

OCaml 5.4.0 with ThreadSanitizer enabled.

On Linux, you need to reduce ASLR entropy to build the TSan-enabled OCaml compiler:

sudo sysctl -w vm.mmap_rnd_bits=28

Have libunwind-dev and pkg-config installed on your system, before creating the switch, if they aren't already, although opam may trigger their installation.

opam switch create ocaml+tsan ocaml-variants.5.4.0+options ocaml-option-tsan --yes
eval $(opam env --switch ocaml+tsan)
opam install -y dune ocaml-lsp-server merlin utop alcotest dscheck qcheck-stm qcheck-lin

(Optional, only if you are curious to try) oxcaml switch

OxCaml 5.2.0+ox from the Jane Street opam repository. Note: utop did not compile with OxCaml at the time of writing this document. Check autoconf and rsync are installed on your system, before creating the switch.

More info about OxCaml can be found on the official website.

opam update --all
opam switch create oxcaml \
  --repos "ox=git+https://github.com/oxcaml/opam-repository.git,default" \
  ocaml-variants.5.2.0+ox --yes
eval $(opam env --switch oxcaml)
opam install -y ocamlformat merlin ocaml-lsp-server