systems layer / zag
code that
keeps its word.
Zag is a systems language where realtime, noalloc, and pure are checked by the compiler, not just written in a comment and hoped for.
the guarantees
annotations the compiler enforces.
@realtimeGuarantees a function never blocks in ways that break timing.
@noallocGuarantees a function never allocates memory on the heap.
@pureGuarantees a function has no side effects, checked at compile time.
a comment vs an annotation
they look similar. they aren't.
a comment saying "this never allocates"
trusted until it isn't
@noalloc on the same function
checked on every build
a docstring promising realtime safety
trusted until it isn't
@realtime on the same function
checked on every build
run it yourself
compile and run your first zag file.
$ git clone https://github.com/Sylorlabs/zag$ cd zag/zag-poc && chmod +x znc bootstrap.sh && ./bootstrap.sh
Want editor support? View Editor Grammar ↗
the foundation under our tools.
Zag grew out of the same low level work that powers Ghost and Zenith. It's early, it's small, and we're building it in the open.
See the Products