Docs

zlow is one native binary: no Node.js, no JVM, no Gradle in the hot path. Every command below runs against the real CLI — nothing here is illustrative pseudo-output.

Getting started

TypeScript is installed as an npm dependency; the binary underneath does the transpiling, bundling, and type-checking. Kotlin is built from source today and driven through zlow native against a project's zlow.json.

Install

npm install --save-dev zlow

npm resolves the right native binary automatically via an optional dependency (@zlow/<os>-<arch>), covering six platform triples: linux-x64, linux-arm64,darwin-x64, darwin-arm64, win32-x64,win32-arm64. win32-* is the one platform without the in-process N-API addon — the programmatic API falls back to a persistent-service route there instead.

Build from source

No npm install required — the Zig build produces the same binary:

zig build            # zig-out/bin/zlow, plus the native addon on POSIX
zig build dist       # cross-compile all six release targets

TypeScript

Four commands, one shared frontend: transpile, type-check, bundle, and roll up declarations.

build

./zig-out/bin/zlow build file.ts               # emit JS (type stripping)
./zig-out/bin/zlow build src/ --out-dir dist/   # whole directory, parallel + incremental
./zig-out/bin/zlow build src/ --out-dir dist/ --watch   # rebuild on change

check

./zig-out/bin/zlow check  file.ts               # type-check one file
./zig-out/bin/zlow check src/ --lib-dir <ts>/lib --types-dir <@types/node>  # whole project

bundle

./zig-out/bin/zlow bundle src/index.ts          # link the graph into one ES module
./zig-out/bin/zlow bundle src/index.ts --deps --out-dir dist/   # link node_modules too

declarations

./zig-out/bin/zlow declarations file.ts         # emit a .d.ts (isolatedDeclarations)
./zig-out/bin/zlow declarations src/index.ts --rollup   # one .d.ts for the package

Kotlin

A project-file frontend that compiles a closed Double/Boolean v0 kernel to native via the shared ZTIR backend — measured against pinned Kotlin/Native. Everything outside that kernel is a named refusal, not a guess.

Project setup

zlow.json in the project root names the language and entry file:

{ "language": "kotlin", "entry": "src/main.kt" }

native

zlow native .                       # zlow.json in the current dir
zlow native src/main.kt --emit-llvm out.ll

Accepted: Double/Boolean top-level fun,val/var, if/while as statements, arithmetic, calls between functions in the unit. Classes, collections, strings, and coroutines are out of profile for v0.

No silent wrongness

A construct zlow cannot honour — in either language — is a named, located refusal with nothing written. It never emits output that merely looks right.