A statically typed, compiled, general-purpose language with compile-time ownership tracking and zero-cost abstractions.
Status: Active development — not production-ready. You can follow us in Discord if you want to colaborate or see the progress
Zith uses Node Resource Analysis (NRA) — a compile-time pass that enforces ownership, borrowing, and memory safety without a borrow checker or garbage collector. No lifetime annotations, no runtime pauses, no hidden cost. The compiler proves your memory is safe before the program runs, and the syntax stays clean.
zith new hello-world
cd hello-world
zith runfrom std/io/console;
fn main() {
@println("Hello, World!");
}
lend gives exclusive temporary mutation. view gives read-only access. The -> operator pipes data left-to-right, and ! propagates errors out of the chain automatically.
fn scale(p: lend Point, factor: f32) {
p.x *= factor;
p.y *= factor;
}
fn process(data: view Config) -> Response! {
getData()
-> parse(..)!
-> scale(.., 2.0)
-> save(..)!
}
Include a C header and all functions become available immediately. No bindings to write, no FFI layer to maintain.
import "openssl/ssl.h";
let ctx = SSL_CTX_new(method); // all C functions available as raw fn
Structured goto with compile-time verification. Markers define jump targets, docks invoke them — the compiler ensures correctness.
flow fn run(data: Stream): void {
marker Process(chunk: Chunk, count: i32) {
transform(chunk);
}
for ( i = 0, item in data ) {
dock { jump Process(item, i); }
i += 1;
}
}
- NRA — compile-time ownership tracking without a borrow checker
unique,share,view,lend,belong— zero-cost memory qualifiersscene— arena-based memory regions for data-oriented designs
struct,component(POD),enum(C-style, struct-backed, ADT),union(tagged)- Traits (nominal) vs interfaces (structural)
- Capabilities —
Copy,Arithmetic,Error,Share,Trust, and more
when— pattern matching with ranges, types, and destructuringflow fn/marker/dock/jump— structured goto with compile-time verification->— chain flow operator for left-to-right pipelines
?T(optional) /T!(result) — zero-cost, return-basedor— fallback chains:!load() or backup() or defaultfailblocks — scoped error recovery
comptime— compile-time bindings andconstblocksconst fn— functions forced to resolve at compile time- Reflection via
@intrinsics
- Words — custom operators (prefix, infix, suffix)
- Contexts — scoped DSL injection
- Macros — hygienic, raw, and tag macros
- C interop — automatic
.hbinding, manual semantic annotation - ZIR — portable intermediate format
- Multi-target — VM execution or native compilation via LLVM
Scoop:
scoop bucket add zith https://github.com/GalaxyHaze/Zith.git
scoop install zithHomebrew:
brew tap galaxyhaze/zith
brew install zithLinux / macOS:
curl -fsSL https://raw.githubusercontent.com/GalaxyHaze/Zith/master/scripts/install.sh | bashPass --musl for a statically linked musl build, or a version tag (e.g. v0.0.1).
Windows (PowerShell):
irm https://raw.githubusercontent.com/GalaxyHaze/Zith/master/scripts/install.ps1 | iexWebAssembly:
curl -fsSL https://raw.githubusercontent.com/GalaxyHaze/Zith/master/scripts/install-wasm.sh | bashgit clone https://github.com/GalaxyHaze/Zith.git
cd Zith
cmake -S . -B build
cmake --build build -jRequires CMake 3.15+, a C++17 compiler (GCC/Clang/MSVC), and optionally LLVM for native backend support.
Verify:
zith --help| Command | Description |
|---|---|
zith build |
Build the project |
zith build -m release |
Release build |
zith check |
Syntax and type checking without compilation |
zith compile <file> |
Compile to ZBC bytecode |
zith execute <file.zbc> |
Run a compiled bytecode file |
zith run |
Build and run in one command |
See the Build from Source section to get a local development environment set up.