This document describes how to set up dependencies and build STELF locally.
STELF is an in-progress OCaml port of Twelf. Some areas of the codebase are still under active translation, so occasional compile failures in unfinished subsystems can be expected.
- OCaml 5.0 or newer
- opam 2.1 or newer
- dune 3.20 or newer
Optional but useful:
ocamlformat(for formatting)odoc(for docs)
From the repository root:
opam switch create . ocaml-base-compiler.5.1.1
eval "$(opam env)"
# Pin local basis package used by this repository
opam pin add -y basis ./basis
# Install dependencies for stelf
opam install -y . --deps-only --with-test --with-docIf you already have a switch for this repo, you can skip switch creation and just run:
eval "$(opam env)"
opam pin add -y basis ./basis
opam install -y . --deps-only --with-test --with-docdune builddune build --profile=releasedune build --profile=checkdune testOr run the test alias explicitly:
dune build @runtestdune fmtdune build @docThe main executable is built via dune:
dune build bin/main.exeAfter a successful build, the binary is available under _build/default/bin/.
Common targets:
make build
make test
make fmt
make checkNote: the install target currently depends on build-release, which is not
defined in the current Makefile. Prefer dune commands directly for installation
flows until that target is updated.
-
If dune cannot find dependencies, ensure your opam switch is active:
eval "$(opam env)"
-
If
basisresolves incorrectly, re-pin local basis and reinstall deps:opam pin add -y basis ./basis opam install -y . --deps-only --with-test --with-doc -
If build failures appear in partially ported modules, verify whether the failure is in actively translated code before treating it as a regression.