deox

Latest binarytrees over arenas runs in a quarter of C's time, in 20 MiB. Read the report →

A systems language

C's reach. Go's feel and concurrency. Rust's safety without lifetimes. Deterministic cleanup. No tracing garbage collector.

  • [x] statically typed
  • [x] C & LLVM backends
  • [ ] garbage collector

01 Why deox

Every language it borrows from is missing something. deoxlang picks up the pieces. Who is it for, and who should wait?

SAFE

Safe code cannot read freed memory, overrun a buffer, dereference null, or race on shared data. Undefined behaviour lives only in unsafe.

FAST

Native code through C or LLVM. No tracing collector, no hidden allocation. Arenas when you want a whole tree gone in one reset.

NO GC

Ownership with own, ref and weak, and deterministic destruction. Nothing kept alive waiting for a collector.

TASKS

Go's model: spawn, channels and select. A task is cheap, and one that waits on a channel, timer or socket costs nothing.

ERRORS

Result and Option, postfix ?, or, wrap, defer and errdefer. A Result can't be dropped on the floor.

C FFI

import "zlib.h" reads the header at build time. Call libc, hand qsort a comparator written in deox.

TOOLS

build test cover fmt doc prof lsp, one binary. One formatter, no options. Errors that tell you the edit that fixes them.

LEARNABLE

Spelled-out over sigils. A C or Go programmer writes useful code on day one, and so does a model pattern-matching to Rust or Go.

02 A taste

Braces and newlines, no semicolons, name: Type everywhere.

/// What reading a number can fail with.
enum NumError {
    Empty
    BadDigit(text: string)
    TooLarge(text: string)
}

fn number(s: string) -> Result[int, NumError] {
    if s.len() == 0 { return Err(Empty) }
    mut n = 0
    for i in 0..s.len() {
        if s[i] < '0' || s[i] > '9' { return Err(BadDigit(text: s.copy())) }
        n = n * 10 + int(s[i] - '0')
        if n > 65535 { return Err(TooLarge(text: s.copy())) }
    }
    return Ok(n)
}

// wrap attaches a sentence and boxes, ? propagates.
fn report(name: string, text: string) -> Result[string, Error] {
    defer print(f"  {name}: done")
    errdefer print(f"  {name}: giving up")
    let cfg = load(text).wrap(f"loading {name}")?
    // or with a value: the default.
    let retries = cfg.retries or 3
    return Ok(f"{cfg.host}:{cfg.port}, {retries} retries")
}

03 Benchmarks

binarytrees, run time in ms, best of 5. 2026-11-28, AMD Ryzen AI MAX+ 395, Arch Linux. Lower is better.

#LANGUAGETIMEMSRSS
1DEOX ARENAS172.820M
2DEOX · C395.066M
3DEOX · LLVM442.166M
4C -O2701.234M
5GO712.147M
6ZIG904.816M
7V -prod1094.1183M
8RUST -O1102.433M

One benchmark on one machine; the full method and the other programs (wordcount, nbody, mandelbrot, hashmap…) are in bench/RESULTS.md.

04 Standard library

A standard library written in deoxlang wherever it can be.

NETnet http http2 https tls websocket wss url
CRYPTOsha256 sha3 blake3 chacha20poly1305 aesgcm ed25519 x25519 argon2 — constant time, no C
DATAjson hex base64 binary bytes strings unicode regex
PACKgzip zlib flate zstd lz4 xz bzip2 tar zip archive
DBsql sqlite postgres — parameters bound by type, never spliced
MATHmath bigint decimal random — money rounds only when asked by name
SYSos io path process flag term pty time context sync log
MEMarena runtime ffi slices — values made and released together

05 Examples

Real programs in examples/, each with a selftest that runs in the suite.

  1. http.dxan HTTP server, a task per connection
  2. chip8.dxa CHIP-8 emulator, 35 instructions
  3. lisp.dxa Lisp with closures and their cycles
  4. kv.dxa key-value server, 1000-connection load test
  5. rx.dxregex on a Pike VM, linear time
  6. mk.dxa parallel task runner, cancelled on Ctrl-C
  7. maze.dxcarved from a seed, solved with A*
  8. asm.dxan assembler and its virtual machine
  9. pack.dxLZ77 and Huffman, by hand

06 Get started

1 Install the latest release. The script verifies the checksum and installs to ~/.local/bin.

sh install.sh

2 Write hello.dx, then build it.

deox build hello.dx && ./hello

Linux and macOS, amd64 and arm64. deox compiles through C, so the machine needs cc; -backend=llvm wants clang 15 or later. install.sh is at the root of the repository.

Coming from…

GO RUST PYTHON C

Read the manual

TUTORIAL SPEC SYNTAX EDITORS