If you encounter a problem or have questions, please open a GitHub issue.
ocamlc -version, js_of_ocaml --version)opam install --deps-only -t js_of_ocaml js_of_ocaml-lwt \ js_of_ocaml-compiler js_of_ocaml-toplevel js_of_ocaml-ppx \ js_of_ocaml-ppx_deriving_json js_of_ocaml-tyxml
dune build @all
mastermake tests)CHANGES.md with an entry describing your changeCode is formatted with ocamlformat 0.29.0. Run before committing:
make fmt
JavaScript runtime files are formatted and linted with Biome:
make fmt-js make lint-js
# Run all tests make tests # Run WebAssembly tests make tests-wasm # Run a specific test directory dune build @compiler/tests-jsoo/runtest dune build @compiler/tests-ocaml/runtest-js WASM_OF_OCAML=true dune build @compiler/tests-ocaml/runtest-wasm # Run javascript parser tests cd compiler/tests-js-parser git clone https://github.com/tc39/test262.git test262 dune build @runtest-parser # Update expected test output after intentional changes dune promote
Test directories:
compiler/tests-jsoo/ - JavaScript and WebAssembly testscompiler/tests-wasm_of_ocaml/ - JavaScript and WebAssembly testscompiler/tests-compiler/ - Compiler unit testscompiler/tests-ocaml/ - Tests from the OCaml compiler codebasecompiler/tests-full/ - Full integration testscompiler/ - Compiler implementation
lib/ - Core compiler librarylib-wasm/ - WebAssembly backendbin-js_of_ocaml/ - js_of_ocaml entry pointbin-wasm_of_ocaml/ - wasm_of_ocaml entry pointlib/ - Library packages (js_of_ocaml, lwt, tyxml bindings)ppx/ - PPX syntax extensionsruntime/ - JavaScript and WebAssembly runtime filestoplevel/ - Web-based OCaml toplevelexamples/ - Example projects