hanki

Building from source

These instructions apply to a checkout of the source tree, which is not yet public.

A build with the LLVM native backend needs the Rust toolchain named in rust-toolchain.toml and LLVM 22.1, with llvm-config-22, or an llvm-config that reports 22.1, on PATH, or LLVM_SYS_221_PREFIX set to the LLVM install prefix:

cargo build --release

A bytecode-only build needs only the Rust toolchain. In that build, hanki run, hanki check and hanki test are available, and hanki build reports that the hanki-aot helper is not installed:

cargo build --release --no-default-features

Either command writes the binary to target/release/hanki. With it on PATH:

hanki new hello
hanki run hello
hanki test hello
hanki build hello

hanki new writes a project directory with src/main.hk, a hanki.config.hk manifest and a copy of the language reference. hanki run executes it on the bytecode interpreter, hanki test runs its test blocks, and hanki build compiles it through LLVM to hello/out/hello, which produces the same output, diagnostics, effects and exit code as hanki run.