Nox
Download

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.

TypingStatic 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 protocolsCompile-time monomorphization with structural protocols; a heterogeneous collection falls back to a fat pointer without any change in the source.
ErrorsExceptions compile to an implicit error-union return chain. No unwind tables and no landing pads are emitted, on either back end.
Concurrencyasync/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 · ASAPA 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 · ARCWhen 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 collectorScans only ARC-managed objects, triggered by allocation pressure.
Layer 4 · lowlevelArena, pool and raw-pointer allocation. It relaxes how memory is allocated, never how types are checked. See ownership.

Compilation

Two back ends, one program.

SituationBack end
macOS or Linux, clang or zig on PATHLLVM (default), -O2
Windows with zig on PATHLLVM through zig cc (default)
--backend qbe, -g, --emit-asm, freestanding, or no clang/zigQBE (small, fast to compile)
iOS, Android, WebAssemblyLLVM only

Both back ends run the whole golden test corpus and must agree on program output. Details: Backends.

Targets

Where Nox programs run.

TargetStatus
macOS arm64Full test suite in CI · prebuilt, Homebrew
Linux x86-64, aarch64Full test suite in CI · tarball, AppImage, Snap, AUR
Windows x86-64The whole Debug test corpus in CI · installer and zip
Linux riscv64Static 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, AndroidExperimental: 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") programSize
macOS arm640.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 networkHTTP client and server (HTTP/1.1, HTTP/2, HTTP/3), router, WebSockets, TLS, gRPC, templates
DataSQLite, PostgreSQL, MySQL drivers, JSON, TOML, YAML, CSV, protobuf
SecurityHashing, HMAC, secure randomness, Argon2id/bcrypt/scrypt, JWT
SystemsFiles, processes, threads, atomics, shared memory, raw memory
Optional C librariesLZ4, 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.

NNIA stable C ABI with opaque, generation-checked handles. Native code never sees a pointer into Nox’s heap. Read more.
Plugin APIA manifest and lifecycle for native plugins loaded at run time with declared capabilities. Read more.
NAPIThe language surface and standard library that frameworks program against. Read more.
extern defDirect C calls, with noxc bindgen generating bindings. This runs with full native authority; see security.
Embedded WebAssembly, HPyImport a .wasm module as a library; run Python C extensions through an opaque-handle bridge.

Toolchain

One command for everything.

noxcinit, 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.
EditorsA language server (noxlsp), a VS Code extension and a tree-sitter grammar.
PackagesThe noxpkg registry with GitHub sign-in; each package carries a source label (Nox, C, C++, Rust, Go, Zig or mixed).
To build programsA 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.