razen — experimental · lexer, parser & semantic analyzer complete

the language
built different

Razen is a systems language: no hidden allocations, no implicit casts, predictable control flow, compile-time evaluation. The code you write is the code that executes.

$curl -fsSL razen.dev/install | shclick to copy
no hidden allocs ·no implicit casts ·compiles via llvm ·union types ·exhaustive match ·no garbage collector ·behaviours (traits) ·error!T unions ·explicit allocators ·comptime evaluation ·no hidden allocs ·no implicit casts ·compiles via llvm ·union types ·exhaustive match ·no garbage collector ·behaviours (traits) ·error!T unions ·explicit allocators ·comptime evaluation ·
// features

what makes razen, razen.

for engineers who want Rust's safety without the borrow checker, Zig's explicitness with more convenience, C's performance without the footguns.

compile-time everything
Type checking, memory analysis, null safety — all resolved before a single byte runs. const and const func evaluate at comptime. Zero runtime metaprogramming.
algebraic data types
Unions, structs, enums — sum and product types as first-class citizens. Exhaustive pattern matching with match. Model your domain precisely.
no nulls. ever.
Null is replaced by ?T optionals. Nullable pointers are ?*T. The compiler enforces every unwrap. No null pointer exceptions, by construction.
native performance
Compiles to optimized machine code via LLVM. No VM, no JIT, no GC pauses. Zero-cost abstractions — high-level code emits the instructions you'd write by hand.
raze package manager
Single binary. Add packages with raze add, build with raze build --release. Deterministic builds. Lockfiles that actually work.
readable syntax
Every construct has exactly one job. No ambiguous syntax, no context-dependent behavior. func ret match — words that mean what they say.
// syntax

code that reads like thought.

Every construct has one job. func declares. ret returns. match is exhaustive. := infers. No surprises.

main.rz — razen
1// Razen — unions, matching, error handling
2
3use fmt
4
5union Shape {
6  Circle(f64),
7  Rect(f64, f64),
8}
9
10func area(s: Shape) -> f64 {
11  match s {
12    Circle(r) => 3.14159 * r * r,
13    Rect(w, h) => w * h,
14  }
15}
16
17error AppError { InvalidInput, Overflow }
18
19func main() -> AppError!void {
20  c := Shape.Circle(5.0)
21  fmt.println("area = ", .{area(c)})
22  ret
23}
exhaustive matching
The compiler verifies every branch is handled. Add a union variant, the compiler flags every unhandled match site.
errors are values
No exceptions. Error!T forces callers to handle failure. try propagates, catch handles. No hidden control flow.
inferred, not guessed
Type inference flows through the whole program. Annotate where it matters with name : Type = expr. Omit where it's obvious.
explicit allocation
No GC, no hidden malloc. Every heap op takes an allocator parameter: @arena @pool @fixed. You decide where memory lives.
0
// hidden allocs
0
// runtime exceptions
32k
// max int width (bits)
100%
// explicit type coverage
// comparison

razen vs. the field.

not another clone. a synthesis of what works, none of what doesn't.

// razen
speed
96
safety
98
dx
94
ergonomics
95
// rust
speed
98
safety
99
dx
58
ergonomics
62
// go
speed
82
safety
70
dx
86
ergonomics
80
// zig
speed
97
safety
80
dx
72
ergonomics
68
// install

one command. you're in.

works on linux, macos, windows. single binary. no dependencies.

unix / macos
windows
raze
$curl -fsSL razen.dev/install | shcopy
$razen --versioncopy
razen 0.1.62 (stable)
PS>irm razen.dev/install.ps1 | iexcopy
PS>razen --versioncopy
razen 0.1.62 (stable)
$raze add httpcopy
$raze build --releasecopy
$raze runcopy

write the future.

razen is free, open source, and early. lexer · parser · semantic analyzer — complete. llvm codegen — in progress.

→ get startedread the specjoin discord