If you already have opam installed and initialized, create these three switches instead of using a devcontainer.
Standard OCaml 5.4.0 with tutorial dependencies.
opam switch create ocaml ocaml-base-compiler.5.4.0 --yeseval $(opam env --switch ocaml)opam install -y dune ocaml-lsp-server merlin utop alcotest dscheck qcheck-stm qcheck-linOCaml 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=28Have 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 --yeseval $(opam env --switch ocaml+tsan)opam install -y dune ocaml-lsp-server merlin utop alcotest dscheck qcheck-stm qcheck-linOxCaml 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 --allopam switch create oxcaml \
--repos "ox=git+https://github.com/oxcaml/opam-repository.git,default" \
ocaml-variants.5.2.0+ox --yeseval $(opam env --switch oxcaml)opam install -y ocamlformat merlin ocaml-lsp-server