Nax ...
A general-purpose system programming language and compiler, designed to build high-performance, safe, and reliable cross-platform software in a concise and elegant way.
Why Nax?
Lightweight & Concise & Natural
Lightweight, concise, consistent syntax design, easy to master and quickly get started
Safe & Reliable
Strong typing, static analysis and compilation, memory safety, typed error handling, easily write safe and reliable software
High Performance
High-performance GC implementation, high-performance shared stack coroutine implementation, libuv-based network IO, runtime implemented in pure C
Hybrid Run Modes
GC and coroutine scheduling in .n files, manual memory management in .x files, calls between the two
Benchmarks
Compared with Go, Rust and Node.js in the same environment. Nax is marked in red, and every value axis starts at zero.
- 100 million C function calls (sqrt)
- ~73msGo ~2,178 ms
- Peak memory of 1 million coroutines
- ~969MBGo ~2,580 MB
- HTTP server
- ~104,000req/sGo ~90,000, Node.js ~66,000
HTTP server (req/s)
| Language | Result |
|---|---|
| Nax | ~104,000 |
| Go | ~90,000 |
| Node.js | ~66,000 |
1 million coroutines: creation time
| Language | Result |
|---|---|
| Nax | ~559 ms |
| Go | ~1,035 ms |
1 million coroutines: peak memory
| Language | Result |
|---|---|
| Nax | ~969 MB |
| Go | ~2,580 MB |
100 million C function calls (sqrt)
| Language | Result |
|---|---|
| Nax | ~73 ms |
| Go | ~2,178 ms |
Fibonacci(45)
| Language | Result |
|---|---|
| Rust | ~1.7 s |
| Nax | ~2.4 s |
| Go | ~2.4 s |
| Node.js | ~6.0 s |
Computing π, 1 billion iterations
| Language | Result |
|---|---|
| Nax | ~512 ms |
| Go | ~512 ms |
| Rust | ~552 ms |
| Node.js | ~850 ms |
Environment: Nax v0.7.2, Go 1.25.5, Rust 1.92.0, Node.js v25.2.0, Linux virtual machine (aarch64, Apple M4, 9 cores, 8 GB).
The full data and the methods are in the benchmark repository.
Features
Built-in Concurrency
Built-in concurrency primitives go, future, channel and select, on shared stack coroutines that switch millions of times per second
Native Toolchain
Compiles straight to machine code of the target platform without LLVM, with its own assembler and ELF, Mach-O and COFF/PE linkers, and supports cross-compilation
Zero-Overhead C FFI
Call C standard library functions without any performance loss, and link static libraries built by any language
import libcfn main() {f64 r = libc.sqrt(144.0)println(r) // 12.000000}
Type System and Tooling
A complete type system with generics, enum, tagged union, interface, nullable(?) and errable(!). The npkg package manager, editor LSP support, nax fmt, and tests written directly in source files
Perfect For
Server Applications
API, command line, MCP services, network middleware
Systems Programming
Operating systems, IoT, container systems
Game Development
Game engines and game development
Explore Possibilities
Databases, programming education, GUI, computer science ...