Installation
Beloch’s evaluator core is written in OCaml. The repo ships a Nix flake that provides the full OCaml toolchain (dune, menhir, sedlex, ocaml-lsp, …).
Prerequisites
Section titled “Prerequisites”- Nix with flakes enabled, or a working OCaml + dune setup and Bun for the docs site
- direnv (recommended) —
direnv allowdrops you into the dev shell automatically
Build the CLI
Section titled “Build the CLI”# Option A — dev shell (direnv or nix develop)direnv allow # or: nix developdune builddune exec beloch -- --version
# Option B — Nix build (no dev shell needed)nix build # produces ./result/bin/belochThe CLI exposes beloch fold FILE.bel, which evaluates a program and emits
FOLD JSON on stdout.
Build the docs site
Section titled “Build the docs site”cd sitebun installbun run build # runs beloch for every <Beloch> component on the pageThe build resolves the binary from _build/default/bin/main.exe (dev shell
build) or you can point it elsewhere:
BELOCH_BIN=/path/to/beloch bun run build