A statically typed language with Python’s syntax, compiled ahead of time to native code.
Memory is managed for you — there is no borrow checker, no lifetime syntax and no free. Write what you mean; the compiler works out the rest.
curl -fsSL https://noxlang.com/install.sh | sh
macOS and Linux. On Windows: irm https://noxlang.com/install.ps1 | iex
class Counter:
n: int
def __init__(self, start: int) -> None:
self.n = start
def bump(self) -> int:
self.n += 1
return self.n
async def square(x: int) -> int:
return x * x
c: Counter = Counter(40)
c.bump()
a: Task[int] = spawn square(6)
print(c.bump(), await a)42 36Why Nox
Familiar to write. Honest about the machine.
Python’s syntax, checked at compile time
Every parameter, variable and return value has a type the compiler verifies — no Any, no surprises at run time. If you can read Python, you can read Nox.
Memory without the vocabulary
Values are freed at their last use when the compiler can prove it is safe, and reference-counted when it cannot — silently, never as an error you have to fix.
Native, and parallel by default
Compiled through LLVM (or the small QBE back end) into a single executable. Tasks and channels run on a work-stealing scheduler across every core.
In practice
A small language that writes real programs.
Every example here is compiled and run when this site is built.
class Account:
balance: int
def __init__(self, balance: int) -> None:
self.balance = balance
def withdraw(self, amount: int) -> None:
if amount > self.balance:
raise ValueError("insufficient funds")
self.balance -= amount
acct: Account = Account(100)
try:
acct.withdraw(30)
acct.withdraw(100)
except ValueError as e:
print("refused:", e.message)
print(acct.balance)refused: insufficient funds
70async def worker(ch: Channel[int], n: int) -> None:
await ch.send(n * n)
async def run() -> None:
ch: Channel[int] = Channel[int](4)
for i in range(4):
spawn worker(ch, i)
total: int = 0
for i in range(4):
total += await ch.recv()
print("total", total)
t: Task[None] = spawn run()
await ttotal 14import nox.http
from nox.http import HttpRequest, HttpResponse
from nox.router import Router, Context
router: Router = Router()
def hello(ctx: Context) -> HttpResponse:
headers: dict[str, str] = {}
headers["Content-Type"] = "text/plain; charset=utf-8"
return HttpResponse(200, "hello, " + ctx.param("name") + "\n", headers)
router.get("/hello/:name", hello)
def handle(req: HttpRequest) -> HttpResponse:
return router.dispatch(req)
nox.http.serve(8080, handle)extern def sqrt(x: float) -> float from "m"
def hypot(a: float, b: float) -> float:
return sqrt(a * a + b * b)
print(hypot(3.0, 4.0))5.0Build on Nox
Three APIs, one stability promise.
Nox 2.0 draws a clear line around what stays compatible for the whole 2.x series — and what is free to change.
Read the API overviewPlugin API manifest · lifecycle
Describe a native plugin in nox-plugin.json and load it at run time with nox.plugin — versioned, with declared capabilities.
NNI native C ABI
A stable C interface with opaque, generation-checked handles. Native code never sees a pointer into Nox’s heap.
NAPI source contract
The Nox API itself: the language surface and standard library that frameworks and libraries program against.
Standard library
46 modules, ready on day one.
Servers, databases, formats and cryptography ship with the compiler — each documented with examples that run.
Web
HTTP client and server, router, WebSockets, TLS and templates.
Data
SQLite, PostgreSQL and MySQL drivers, an ORM layer, JSON, TOML, YAML and CSV.
Security
Hashing, HMAC, secure randomness, Argon2id password hashing and JWT.
Systems
Files, processes, threads, atomics, shared memory and raw memory access.
Toolchain
One command for everything.
Build, run, test, format and explain code; manage packages; upgrade the compiler itself. A language server and editor support come in the box.
Explore noxc$ noxc init hello && cd hello $ noxc run main.nox $ noxc build -o hello main.nox $ noxc test $ noxc explain main.nox # where each value lives, and why $ noxc search http # query the noxpkg registry $ noxc upgrade # update the compiler
Platforms
Runs where you build.
| Platform | Status |
|---|---|
| macOS · Apple silicon | Fully tested |
| Linux · x86-64 and aarch64 | Fully tested |
| Windows · x86-64 | Supported, end-to-end smoke tested |
| Bare metal · freestanding x86-64 | Boots a real kernel image under QEMU in the test suite |
Details and known gaps are in the platform notes.
Write your first Nox program.
Install in a minute, then follow the tutorial from “hello” to a small web service.