Welcome to Zith
New to Zith? Start here:
- Why Zith? - Learn why Zith is great for systems programming
- Installation - Set up Zith on your machine
- Quick Start - Write your first program
What is Zith?โ
Zith is a statically-typed systems programming language designed for developers who want:
- Explicit control flow without hidden magic
- Zero-cost abstractions that don't compromise performance
- Memory safety through a simple ownership model (no garbage collection)
- Modern tooling with a built-in package manager and language server
Zith starts simpleโlike Cโbut scales gracefully to handle complex systems with features like components, entities, and contexts for safe DSLs.
Key Featuresโ
๐ฏ Expressivityโ
Every language construct communicates intent clearly:
fn process(mut self: Health, dmg: view u16) { }
// ^ explicit ownership: view = read-only
๐ก๏ธ Safety Through Typingโ
The compiler detects errors through rigorous semantics:
let health: unique u16 = alloc.new(100);
let ref: view u16 = health;
ref += 10; // Compile Error: view does not allow writing
๐งฉ Optional Complexityโ
Start simple, add features when needed:
// Basic: functions like C
fn add(a: i32, b: i32): i32 { a + b }
// Advanced: ECS when appropriate
component Position { x, y: i32 }
entity Player { Position, ... }
๐ฎ Contexts for Safe DSLsโ
Domain-specific languages without strings or injection:
context SQL {
use infix = SQL.operators;
infix operator SELECT(cols);
}
use context SQL {
result = SELECT * FROM users WHERE age > 18;
}
๐ฌ Scenes as Logical Unitsโ
Isolated resource containers for games and applications:
scene MainMenu { /* isolated resources */ }
scene GameLevel { /* isolated resources */ }
scene PauseMenu { /* isolated resources */ }
Who Is Zith For?โ
โ
Beginners learning low-level programming
โ
Game developers building engines and tools
โ
Systems programmers who want clarity without sacrificing control
โ
DSL designers creating domain-specific languages
What Zith Is Notโ
โ A direct replacement for Rust (Rust offers stronger safety guarantees)
โ A "better C++" (C++ has a massive ecosystem)
โ A garbage-collected language (zero overhead is a priority)
โ Suited for pure functional programming
Next Stepsโ
| I want to... | Go to... |
|---|---|
| Understand why Zith matters | Why Zith? |
| Install Zith | Installation |
| Write my first program | Quick Start |
| See CLI commands | CLI Reference |
| Learn the language | Language Guide |โ
Ready to dive in? Let's explore Why Zith? โ