The World's First AI-Native Systems Programming Language
A revolutionary programming language with ZERO KEYWORDS. All control flow through pattern matching (?), UFC (Uniform Function Call), and powerful metaprogramming.
"No keywords. Pure expression. Allocator-driven concurrency."
The Zen compiler is functional with all core language features working. The project has a comprehensive test suite and full LSP support for IDE integration.
- Zero-keyword syntax - Pattern matching with
?replaces all conditionals - All 6 variable forms - Immutable/mutable, typed/inferred declarations
- Type system - Structs, enums, generics, Option, Result<T,E>
- UFC - Uniform Function Call for method chaining
- Error handling -
.raise()for error propagation - Collections - Vec, String with allocator support
- Behaviors - Structural trait system
- I/O - Syscall-based file and network I/O (Linux x86-64)
- LSP - Full IDE support with semantic completion, hover, go-to-def, etc.
- 25+ intrinsics - Memory, pointers, syscalls, atomics
- Module system improvements for cross-boundary generics
- Iterator combinators (map, filter, collect)
- First-class closure support
- Cross-platform (macOS, Windows)
- Package manager
- Self-hosting compiler
# Build the compiler
cargo build --release
# Run a Zen program
./target/release/zen examples/showcase.zen
# Compile to executable
./target/release/zen examples/hello.zen -o hello
./hello
# Run test suite
cargo test --allx = 10 // Immutable, inferred
x ::= 10 // Mutable, inferred
x : i32 = 10 // Immutable, typed
x :: i32 = 10 // Mutable, typed
value ?
| Some(x) { use(x) }
| None { handle_empty() }
status ?
| .Active { process() }
| .Inactive { wait() }
add = (a: i32, b: i32) i32 { return a + b }
// Both work:
result = add(5, 3)
result = 5.add(3)
Point: { x: f64, y: f64 }
Color: Red, Green, Blue
Option<T>: Some: T, None
load = (path: string) Result<Data, Error> {
file = File.open(path).raise() // Early return on error
return Ok(file.read())
}
allocator = GPA.new()
vec = Vec<i32>.new(allocator)
vec.mut_ref().push(42)
vec.mut_ref().free()
| Document | Description |
|---|---|
| docs/OVERVIEW.md | Complete language overview |
| docs/QUICK_START.md | Getting started guide |
| docs/ARCHITECTURE.md | Compiler architecture |
| docs/INTRINSICS_REFERENCE.md | Intrinsics reference |
| LANGUAGE_SPEC.zen | Language specification |
For contributors:
- docs/design/STDLIB_DESIGN.md - Standard library design
- docs/ROADMAP.md - Current roadmap
zenlang/
+-- src/ # Rust compiler source
| +-- parser/ # Syntax analysis
| +-- typechecker/ # Type inference
| +-- codegen/llvm/ # LLVM backend
| +-- lsp/ # Language server
+-- stdlib/ # Standard library (Zen)
+-- tests/ # Test suite
+-- examples/ # Example programs
+-- docs/ # Documentation
+-- vscode-extension/ # VS Code integration
- Zero Keywords - Pattern matching for all control flow
- Explicit Over Implicit - Allocators, pointers, errors all explicit
- UFC Everywhere - Any function callable as method
- No Null - Only Option with Some/None
- Syscall-First - Direct syscalls, minimal runtime
- Rust 1.75+
- LLVM 18.1
- Linux x86-64 (primary target)
cargo build --release # Build compiler
cargo test --all # Run tests
cargo build --bin zen-lsp # Build LSPThis project implements the specification in LANGUAGE_SPEC.zen. All contributions must align with this specification.
MIT