Complete guide to building HLVM binaries.
HLVM uses deno compile to build the native hlvm binary. On macOS, that
goes through Apple's native toolchain, so make build, make repl, make test,
and the platform build targets may require Command Line Tools and an accepted
Xcode/Apple SDK license first.
Build the native binary and launch the REPL:
make repl
This compiles ./hlvm first, then launches its REPL.
Build for your current platform:
make build
This creates ./hlvm binary.
Verify:
./hlvm --version
This binary is now the SSOT build artifact for both:
~/dev/HLVM, which copies this exact binary into HLVM/Resources/hlvmmake build
Output: ./hlvm
make test
Builds binary and runs smoke tests.
make repl
Builds the native hlvm binary and launches its REPL.
make ink
Builds the native hlvm binary and launches the Ink REPL.
make install
Installs to /usr/local/bin/hlvm.
Then use anywhere:
hlvm --version
Intel:
make build-mac-intel
Output: hlvm-mac-intel
Apple Silicon:
make build-mac-arm
Output: hlvm-mac-arm
make build-linux
Output: hlvm-linux
make build-windows
Output: hlvm-windows.exe
Output: hlvm-windows.exe
make all
Creates all binaries:
hlvm-mac-intelhlvm-mac-armhlvm-linuxhlvm-windows.exeIf you don't have make:
deno run -A scripts/build-stdlib.ts
./scripts/embed-packages.ts
deno compile --allow-all --no-check --config deno.json \
--include src/hql/lib/stdlib/js/index.js \
--output hlvm src/hlvm/cli/cli.ts
No AI engine embedding. Ollama is downloaded at bootstrap time, not at build time. The binary is ~120 MB, not ~587 MB.
./hlvm --version
./hlvm run -e '(print "Hello!")'
Include source maps:
deno compile --allow-all --config deno.json \
--include src/hql/lib/stdlib/js/index.js \
--output hlvm src/hlvm/cli/cli.ts
Note: Larger binary, better error messages.
Fastest compilation (production):
deno compile --allow-all --no-check --config deno.json \
--include src/hql/lib/stdlib/js/index.js \
--output hlvm src/hlvm/cli/cli.ts
Note: Default, skips type checking.
Available targets:
x86_64-apple-darwin - macOS Intelaarch64-apple-darwin - macOS Apple Siliconx86_64-unknown-linux-gnu - Linux x64x86_64-pc-windows-msvc - Windows x64Specify with --target:
deno compile --allow-all --target x86_64-apple-darwin --output hlvm src/hlvm/cli/cli.ts
Typical sizes:
The binary includes the Deno runtime, all dependencies, and the HQL stdlib. Ollama is NOT embedded — it is downloaded at bootstrap time. This keeps all platform binaries small and uniform.
~/dev/hql is the only SSOT build source for hlvm.
If you are also working with the macOS GUI wrapper in ~/dev/HLVM:
hlvmscripts/sync-gui-binary.sh~/dev/hql/hlvm if needed, then copies it into HLVM/Resources/hlvmOptional developer convenience hook:
git config core.hooksPath .githooks
That enables the tracked .githooks/post-commit wrapper, which syncs the
bundled binary into a sibling ../HLVM checkout after commits.
The hook is convenience only. The Xcode build phase remains the correctness path, because it always copies the SSOT binary before the app is built.
Make scripts executable:
chmod +x scripts/embed-packages.ts
Install Deno:
curl -fsSL https://deno.land/install.sh | sh
Add to PATH:
export PATH="$HOME/.deno/bin:$PATH"
Clean and retry:
make clean
make build
Update Deno:
deno upgrade
Rebuild on changes:
deno run --allow-all --watch src/hlvm/cli/cli.ts repl
Without building binary:
deno run --allow-all src/hlvm/cli/cli.ts run test.hql
See .github/workflows/release.yml for automated builds.
Builds for:
Remove build artifacts:
make clean
Removes:
hlvmhlvm-* (all platform binaries)