Technical specifications
What Nox is, precisely.
The facts behind the language, in one place: how it compiles, how memory and errors work, where it runs, how big the binaries are and what ships in the box. Current release: Nox 2.2.48. Every row links to the page that documents it.
Language
Python’s syntax, a static type system.
| Typing | Static and mandatory: every parameter, variable and return value has a type the compiler checks. There is no Any and no implicit dynamic fallback, not even inside lowlevel. See the language guide. |
| Generics and protocols | Compile-time monomorphization with structural protocols; a heterogeneous collection falls back to a fat pointer without any change in the source. |
| Errors | Exceptions compile to an implicit error-union return chain. No unwind tables and no landing pads are emitted, on either back end. |
| Concurrency | async/await, tasks and channels on an M:N work-stealing scheduler. Multi-core parallelism is a property of the LLVM back end; QBE programs run tasks on one thread. |
Memory
Managed without a vocabulary.
| Layer 1 · ASAP | A value is freed at its last use when the compiler can prove it is safe. No reference count, no cost at run time. |
| Layer 2 · ARC | When that cannot be proved the value is reference-counted, silently. It is never a compile error and never a hint you must write. |
| Layer 3 · cycle collector | Scans only ARC-managed objects, triggered by allocation pressure. |
Layer 4 · lowlevel | Arena, pool and raw-pointer allocation. It relaxes how memory is allocated, never how types are checked. See ownership. |
Compilation
Two back ends, one program.
| Situation | Back end |
|---|---|
macOS or Linux, clang or zig on PATH | LLVM (default), -O2 |
Windows with zig on PATH | LLVM through zig cc (default) |
--backend qbe, -g, --emit-asm, freestanding, or no clang/zig | QBE (small, fast to compile) |
| iOS, Android, WebAssembly | LLVM only |
Both back ends run the whole golden test corpus and must agree on program output. Details: Backends.
Targets
Where Nox programs run.
| Target | Status |
|---|---|
| macOS arm64 | Full test suite in CI · prebuilt, Homebrew |
| Linux x86-64, aarch64 | Full test suite in CI · tarball, AppImage, Snap, AUR |
| Windows x86-64 | The whole Debug test corpus in CI · installer and zip |
| Linux riscv64 | Static musl, QEMU user-mode smoke tests |
| WebAssembly (WASI, freestanding) | Compile to .wasm; the compiler itself also runs in a browser tab (Playground) |
| Bare metal (x86-64, aarch64, riscv64) | Freestanding ELF; all three boot in QEMU in the test suite |
| iOS, Android | Experimental: library output only, not a supported tier |
Cross-compile from any machine with noxc build --target. Known gaps: platform notes.
Size
Small executables.
Measured: a print("hello") program | Size |
|---|---|
| macOS arm64 | 0.21 MB |
| Linux x86-64 (cross-compiled) | 0.34 MB |
| Windows x86-64 (cross-compiled) | 0.78 MB |
The noxc compiler itself (macOS arm64) | 5.7 MB |
Measured on release builds with the LLVM back end (Windows: with zig cc) at version 2.1.176; the linker drops unused runtime and standard-library code, so a program pays only for the modules it imports.
Standard library
83 modules in the box.
| Web and network | HTTP client and server (HTTP/1.1, HTTP/2, HTTP/3), router, WebSockets, TLS, gRPC, templates |
| Data | SQLite, PostgreSQL, MySQL drivers, JSON, TOML, YAML, CSV, protobuf |
| Security | Hashing, HMAC, secure randomness, Argon2id/bcrypt/scrypt, JWT |
| Systems | Files, processes, threads, atomics, shared memory, raw memory |
| Optional C libraries | LZ4, xxHash, yyjson, PCRE2 (JIT), Brotli and Zstandard compression, linked statically and only into programs that import them. They are not available on mobile targets. |
The full list, with examples that are compiled and run when this site is built: standard library.
Interop
Three APIs, one stability promise.
| NNI | A stable C ABI with opaque, generation-checked handles. Native code never sees a pointer into Nox’s heap. Read more. |
| Plugin API | A manifest and lifecycle for native plugins loaded at run time with declared capabilities. Read more. |
| NAPI | The language surface and standard library that frameworks program against. Read more. |
extern def | Direct C calls, with noxc bindgen generating bindings. This runs with full native authority; see security. |
| Embedded WebAssembly, HPy | Import a .wasm module as a library; run Python C extensions through an opaque-handle bridge. |
Toolchain
One command for everything.
noxc | init, build, run (with an optional OS sandbox), check, test, fmt, explain, bindgen, package commands (add, search, publish, install), lockfile signing and SBOM output, and upgrade for the compiler itself. Reference. |
| Editors | A language server (noxlsp), a VS Code extension and a tree-sitter grammar. |
| Packages | The noxpkg registry with GitHub sign-in; each package carries a source label (Nox, C, C++, Rust, Go, Zig or mixed). |
| To build programs | A C toolchain for linking; clang or zig for the LLVM back end. To build the compiler from source: Zig 0.16. |
Check it on your machine.
Install in a minute and run noxc --version.