Active Development

The language that
thinks like you do.

Razen is a statically typed systems language that transpiles to C11-23. Systems-level control. Ergonomic syntax. No garbage collector. Immutable by default, memory-safe by design.

razen-core / razen  ·  Apache 2.0  ·  Linux · macOS · Windows
~25 Keywords
C11-23 Transpile Target
O(1) Deallocation
Zero GC Pauses
DASO Memory Model

Syntax

Reads like prose.
Runs like C.

~25 keywords. No parentheses in control flow. Expression bodies for one-liners. Pattern matching built in. Clean, without being stripped.

// One-liner — expression body
act square(n int) int -> n * n

// Full function — no parens in if / loop
act greet(name str) str {
    if name.is_empty() {
        retn "Hello, stranger!"
    }
    retn "Hello, {name}!"
}

// Generic function
act first[T](arr [T]) Option[T] {
    if arr.is_empty() { retn None }
    retn Some(arr[0])
}

// Pattern match
result := match status {
    Status.Active -> "Online",
    Status.Idle   -> "Away",
    _              -> "Unknown",
}
// Every act = implicit memory region
act compute() {
    a := Vec()
    b := Map[str, int]()
    c := User { id 1, name "Razen" }
} // entire region freed — O(1)

// Escape detected — compiler promotes to heap
act make_user() User {
    u := User { id 1, name "Alice" }
    retn u  // no annotation needed
}

// Shared ownership — explicit opt-in
shared cache := Map[str, Data]()

// Deterministic cleanup
act read_file() {
    f := File.open("data.txt")
    defer f.close()
    data := f.read()
}
// Async action with error propagation
async act fetch_user(id int) Result[User, Error] {
    data := await http.get("/users/{id}")?
    user := json.parse[User](data)?
    retn Ok(user)
}

// ~> async pipeline — no nested callbacks
async act pipeline() {
    result := await fetch_data()
        ~> parse()
        ~> validate()
        ~> save()
}

// shared is automatically atomic across async
shared counter := 0

async act increment() {
    counter = counter + 1
}
// ? propagates errors automatically
act process() Result[int, Error] {
    data  := fetch()?
    value := parse(data)?
    retn Ok(value)
}

// guard — keeps code flat, no nesting
act login(user User) {
    guard user.is_valid()       else { retn Error }
    guard user.has_permission() else { retn Error }
    do_login(user)
}

// No null — Option type everywhere
age := input().parse_int()

match age {
    Ok(n)  -> std.io.print("Age: {n}"),
    Err(e) -> std.io.print("Invalid: {e}"),
}

Built Different

Every decision is
a deliberate trade-off.

Not a research language. Not a toy. Razen is designed for professional developers who need predictability at scale.

DASO — Deterministic Automatic Scoped Ownership

Every act creates an implicit memory region. Allocations inside it are freed all at once when the scope ends — O(1) deallocation, zero GC overhead. Escape analysis is automatic. No lifetime annotations. No Rc<RefCell<T>>. Just predictable memory.

GC pauses lifetime annotations Rc<RefCell<T>> manual free() O(1) region drop zero GC overhead inferred borrows

Transpiles to C11-23

Razen is a high-level frontend that emits clean C. Decades of compiler optimisations, every platform, every toolchain — all inherited for free.

Immutable by Default

:= declares immutable. mut is explicit opt-in. Mutability is visible, intentional, and auditable at a glance.

No Exceptions

Result[T, E] and Option[T] are in the prelude. The ? operator propagates errors with zero boilerplate. guard keeps code flat.

Native Async + ~>

async/await built into the language. The ~> async pipeline operator chains operations without nested callbacks or promise chains.

~25 Keywords

Lightweight core. No parentheses in if or loop. Trailing commas everywhere. One universal loop construct. Clean, without being stripped.

AI-Native tensor Type

tensor is a first-class primitive — N-dimensional array with GPU acceleration support. Not a library addon. Part of the language itself.

Dual Pipeline

One language.
Two build modes.

Razen automatically switches compiler backends depending on whether you're iterating or shipping.

Development

$ razen run

Near-instant compilation via TCC. Mimics the fast feedback loop of an interpreted language while executing native code. No waiting. Just iterate.

Backend:  TCC — Tiny C Compiler

Production

$ razen build

Full optimisation via GCC or Clang. Produces highly efficient, standalone binaries suitable for deployment. Every CPU instruction counts. Ship with confidence.

Backend:  GCC / Clang

Ready to build
something fast?

Install Razen, read the guide, or join the community on Arattai. The language is under active development — now is the right time to follow along.