Rust 1.96.0

Skip Cargo. Ship a binary.

Write a numeric kernel in Rust. zlow compiles it to a native binary, no cargo, no rustc-as-driver, no cranelift. If we can't compile it correctly, we refuse it.

Faster than rustc

8.7 ms to run the branchy kernel. rustc -O took 141.3 ms on the same source.

A real binary

The compile path is Rust source to native. No cargo, no rustc-as-driver, no cranelift.

Checked against rustc

78/78 fixtures agree with pinned rustc 1.96.0, or are refused by name.

Callable from your app

Compile the kernel to a shared library and load it through the generated binding.

8.7 ms

to run the kernel

16.3×

faster than rustc

Lightning fast

Same kernel. The rustc binary walks the branches; the LLVM binary just runs them.

zlowup to 16× faster than rustc
8.7 msentry()
rustc
141.3 msentry()

What's in v0

A kernel, not a rewrite of the Rust compiler. Keep the app in Rust; compile the hot path.

You can write

  • f64 and bool top-level fn
  • let / let mut, if, while, loop, break/continue
  • arithmetic, comparisons, and boolean ops
  • calls between functions in the same project

Not this

  • structs, enums, traits, and generics
  • strings, arrays, tuples, and references
  • for, match, async, and the standard library
  • cargo, the crate graph, and use/mod/extern

Fully featured

Compile the hot path to native. Keep writing Rust.

Try it

Install the CLI, add a project file, then compile from that folder.

Terminal
npm install @zlow/cli
zlow native .

More Rust commands