Nox
Download

Reference

Platforms

What is supported, what is tested, and the known gaps.

Back ends by situation#

Situation Back end
macOS or Linux, hosted, clang or zig on PATH LLVM (.ll → clang -O2, or zig cc -O2), the default
--backend qbe QBE (.ssa → qbe → cc)
freestanding profile, desktop --target, --emit-asm, -g QBE (automatic)
ios-arm64, ios-simulator-arm64, android-arm64, android-x64 LLVM only; --backend qbe is an error
wasm32-wasi, wasm32-freestanding (and their -asyncify variants wasm32-wasi-asyncify, wasm32-freestanding-asyncify, selected by --asyncify) LLVM only (zig cc); --backend qbe, --emit-asm and -g are errors (WebAssembly)
Windows LLVM through zig cc -target x86_64-windows-gnu when zig is on PATH (default); QBE with MinGW cc otherwise
neither clang nor zig installed QBE (automatic, with a note)

Both back ends run the whole golden corpus and must agree on program output, including fixed-width overflow (a trap on both) and plain int wrap-around (Backends).

Support tiers#

Platform Hosted programs CI
macOS arm64 yes (LLVM or QBE) full test suite
Linux x86-64 yes (LLVM or QBE) full test suite
Linux aarch64 yes full test suite
Windows x86-64 yes — LLVM (zig cc) and QBE, end to end (classes, lists, dictionaries, tasks, f-strings, exceptions, TLS and WebSocket); installer and zip releases the whole Debug zig build test corpus on windows-latest, plus end-to-end LLVM/QBE smoke tests
riscv64 hosted Linux (--target linux-riscv64, static musl, QEMU user-mode smoke: class, list, dictionary, loop ordering and spawn/await). Freestanding boots in QEMU virt (see Freestanding) QEMU user-mode smoke CI; not the full corpus
WebAssembly (wasm32-wasi, wasm32-freestanding) .wasm WASI command, or a libc-free module that talks to its host through nox_host imports; --asyncify gives real fibers through wasm-opt; --target wasm32-wasi-threads and wasm32-freestanding-threads (--threads) add parallel M:N threads through shared memory; sockets, child processes and servers are opt-in host capabilities (default off), and there are no native libraries (WebAssembly). The compiler itself also runs in a browser tab (Playground). Tests in zig build test (Node and, where available, PostgreSQL and MySQL servers), the whole corpus under zig build wasm-corpus-test (Node WASI) smoke tests; corpus is opt-in
iOS arm64 and iOS Simulator arm64 library only (--emit-obj or --emit-static-lib). Not a third profile experimental; not supported
Android arm64 and Android x64 libnoxapp.so, 16 KiB ELF alignment experimental; not supported

macOS x86-64 is expected to work (macos-x64) but is not part of CI or the release matrix: there is no prebuilt archive for Intel Macs, so build the compiler from source (Installing).

Freestanding (bare-metal) builds exist for x86-64, aarch64 and riscv64 (all three boot in QEMU as part of the test suite): an ELF with the Zig runtime and a kernel-provided allocator. The x86-64 path is proven by booting a real kernel image in QEMU as part of the test suite (Freestanding).

Toolchain requirements#

To… You need
compile and run Nox programs a C toolchain for linking (cc); clang or zig for the LLVM back end; qbe is bundled for macOS/Linux
build the compiler from source Zig 0.16
use SQLite / PostgreSQL / MySQL libsqlite3 / libpq / libmysqlclient installed at run time (loaded on first use)
use serve_tls an OpenSSL (libssl, libcrypto) at run time; set NOX_OPENSSL_LIB to a specific library path if needed

Known constraints#

  1. No bundled C compiler. clang is not shipped; the driver falls back to zig cc and then to QBE.
  2. Windows runs the whole Debug zig build test corpus and separate end-to-end smoke tests; it does not yet mirror every ReleaseFast/stress job from the macOS/Linux matrix. Under Node's WASI, nox.fs.read_dir is not available on Windows (WebAssembly).
  3. Multi-core parallelism is a property of the LLVM back end; QBE programs run tasks on one thread.
  4. extern def, lowlevel, NNI plugins and dependencies with native code run with full authority (Security).

Reporting a platform problem#

Include noxc --version, the platform, whether --backend qbe reproduces it, and the smallest .nox program that shows it.