C++17
Skip CMake. Match Clang.
Write a numeric kernel in C++. zlow compiles it to LLVM, no CMake, no Make, no clang++ on the compile path. If we can't compile it correctly, we refuse it.
Matches Clang
6.4 ms to run the branchy kernel. clang++ -O2 took 6.4 ms on the same source. The gap is below the noise floor.
Checked against Clang
60/60 fixtures agree with pinned Homebrew Clang 22.1.8, or are refused by name.
LLVM text
zlow writes LLVM with --emit-llvm. kernel-v0 refuses -o and shared libraries.
Small on purpose
v0 is double, bool, and control flow. Keep the rest of the app in C++.
6.4 ms
to run the kernel
1.0×
Clang on the same source
Lightning fast
Same kernel. Both sides are -O2 binaries; only entry() is timed.
What's in v0
A kernel, not a rewrite of the C++ compiler. Keep the app in C++; compile the hot path.
You can write
- double and bool top-level functions
- const, if, while, and the ternary operator
- arithmetic, comparisons, and boolean ops
- calls between functions in the same project
Not this
- the preprocessor, headers, and #include
- classes, templates, namespaces, and exceptions
- integers, pointers, references, and for
- CMake, Make, and clang++ on the compile path
Fully featured
Compile the hot path to LLVM. Keep writing C++.
Native binaries
The bench links LLVM text with zig cc. zlow native -o is refused in kernel-v0.
Skip CMake
One command. No CMakeLists.txt, no Makefile, no compile_commands.json.
Tiny output
A small native binary; no binary-size comparison is measured yet.
Matches Clang
6.4 ms vs 6.4 ms on the branchy kernel. Five kernels sit at parity with clang++ -O2.
Familiar C++
double, bool, if, while, arithmetic — the numeric C++ you already write.
Simple setup
A zlow.json and one command — that’s the whole setup.
Same-project calls
Functions in the project can call each other. No headers, no #include.
No clang++ on the path
Source goes straight to LLVM. No clang++ as a driver in between.
One project
Every .cpp file compiles together. Point zlow at the folder and go.
Clear errors
Out of scope fails loudly. You never ship a binary that almost works.
Checked against Clang
Accepted kernels match the compiler you already trust.
Built for the hot path
Pass --emit-llvm to write the kernel. A shared library is a later step; kernel-v0 refuses it.
Try it
Install the CLI, add a project file, then compile from that folder.
npm install @zlow/cli
zlow native . --emit-llvm kernel.ll