# Nox > Nox is a statically typed, ahead-of-time compiled language with Python's syntax, automatic memory management without a garbage collector and without ownership annotations. Compiled with LLVM or QBE; runtime written in Zig. Full documentation as one file: https://noxlang.com/llms-full.txt ## Start here - [Nox documentation](https://noxlang.com/docs/): Nox is a statically typed, ahead-of-time compiled programming language with Python's syntax. - [What's new in 2.2](https://noxlang.com/docs/whatsnew/2.2/): Nox 2.2 collects everything that shipped in the 2.1.x releases on the way to it. - [What's new in Nox 2.1](https://noxlang.com/docs/whatsnew/2.1/): Nox 2.1 keeps every 2.0 promise (the stability policy is unchanged) and adds what the 2.0 line grew into: Nox in the browser and on WebAssembly, a much stronger HTTP… - [What's new in Nox 2.0](https://noxlang.com/docs/whatsnew/2.0/): Nox 2.0 is the first release with a stability promise across the language, the standard library and the native interface (Stability). - [Migrating from Nox 1.x to 2.0](https://noxlang.com/docs/whatsnew/migrating/): Nox 2.0 removes the names that were deprecated during 1.x and aligns a handful of behaviours with common Python expectations. - [Installing Nox](https://noxlang.com/docs/install/): Nox ships as a single archive per platform containing noxc (the compiler and tool), noxlsp (the language server), the runtime objects, the standard library, the bundled… - [Editor support](https://noxlang.com/docs/install/editors/): The vscode-nox extension (in the repository's editors/vscode-nox) provides: ## Tutorial - [Tutorial](https://noxlang.com/docs/tutorial/): This tutorial teaches Nox by building up small, complete programs. - [1. Hello, Nox](https://noxlang.com/docs/tutorial/01-hello/): Create hello.nox: - [2. Values and types](https://noxlang.com/docs/tutorial/02-values-and-types/): A variable is created by its first assignment, which carries the type. - [3. Control flow](https://noxlang.com/docs/tutorial/03-control-flow/): Combine conditions with and, or, not; chained comparisons work as in Python: - [4. Functions](https://noxlang.com/docs/tutorial/04-functions/): Parameters and the return value are typed; -> None means the function returns nothing. - [5. Collections](https://noxlang.com/docs/tutorial/05-collections/): A list[T] holds elements of one type and grows as needed: - [6. Classes](https://noxlang.com/docs/tutorial/06-classes/): A class declares its fields (owner: str) and a constructor __init__. - [7. Errors](https://noxlang.com/docs/tutorial/07-errors/): int("abc") and the explicit raise both produce a ValueError, caught by one except. - [8. Modules and packages](https://noxlang.com/docs/tutorial/08-modules-and-packages/): Every .nox file is a module. A project is a directory with a nox.json: - [9. Concurrency](https://noxlang.com/docs/tutorial/09-concurrency/): Nox runs work in lightweight tasks. You start one with spawn, wait for its result with await, and let tasks talk through typed - [10. A small web service](https://noxlang.com/docs/tutorial/10-a-small-web-service/): Nox's standard library includes an HTTP server (nox.http), a path router (nox.router) and a JSON module (nox.json). - [11. Files and JSON](https://noxlang.com/docs/tutorial/11-files-and-json/): Most real programs read something from disk and write something back. - [12. Testing](https://noxlang.com/docs/tutorial/12-testing/): Nox has testing built in. A test is just a program that fails by raising an exception; noxc test runs every file named *_test.nox and reports which - [13. Generics and protocols](https://noxlang.com/docs/tutorial/13-generics-and-protocols/): Types are mandatory in Nox, which raises a fair question: how do you write a function once that works for int, str and your own classes? Nox gives you - [14. Databases](https://noxlang.com/docs/tutorial/14-databases/): Nox ships drivers for SQLite, PostgreSQL and MySQL/MariaDB. They share one shape — open a connection, run SQL, read rows — so what you learn with SQLite - [15. Command-line tools](https://noxlang.com/docs/tutorial/15-command-line-tools/): Nox compiles to a single native executable with no runtime to install, which makes it a pleasant language for command-line tools: they start instantly and - [16. WebAssembly and the browser](https://noxlang.com/docs/tutorial/16-webassembly/): The same Nox program that compiles to a native executable also compiles to WebAssembly — a compact binary format that runs in browsers, in Node, and in - [17. Publishing a package](https://noxlang.com/docs/tutorial/17-publishing/): A Nox package is just a Git repository with a nox.json. There is no build server and no upload step: the noxpkg registry keeps a small index — name, - [18. Next steps](https://noxlang.com/docs/tutorial/18-next-steps/): You now know the shape of Nox: static types with Python's syntax, functions and classes, collections, errors, modules, tasks and a web server. - [Recipes](https://noxlang.com/docs/tutorial/recipes/): Short, complete answers to questions that come up all the time. ## Language reference - [The Nox language reference](https://noxlang.com/docs/language/): This part of the documentation describes the Nox language *as it is in 2.0*: its syntax, its static semantics and its runtime - [Lexical structure](https://noxlang.com/docs/language/lexical/): A Nox source file is UTF-8 text with the extension .nox. The lexer turns it into a stream of tokens; indentation produces - [Types](https://noxlang.com/docs/language/types/): Every Nox value has a static type known at compile time. Types are written in annotations and are mandatory on variable - [Numbers](https://noxlang.com/docs/language/numbers/): Nox has three numeric families: the 64-bit signed integer int, the IEEE-754 double float, and the ten fixed-width integer - [Strings](https://noxlang.com/docs/language/strings/): str is an immutable sequence of Unicode code points stored as UTF-8. - [Expressions](https://noxlang.com/docs/language/expressions/): From loosest to tightest binding (operators on one row bind equally): - [Statements](https://noxlang.com/docs/language/statements/): A Nox program is a sequence of statements. The top-level statements of the entry file are the program's entry point — there is no - [Functions](https://noxlang.com/docs/language/functions/): Every parameter has a type and every function has a return type (-> None for procedures; a def that writes no -> T at all returns None, so def greet(name: str): is the… - [Classes](https://noxlang.com/docs/language/classes/): A class declares a new reference type with fields and methods. - [Enums and `match`](https://noxlang.com/docs/language/enums/): An enum is a type whose value is exactly one of several variants, and a variant can carry data (a *tagged union*). - [Protocols and generics](https://noxlang.com/docs/language/protocols-generics/): Nox has two complementary mechanisms for writing code that works over many types. - [Exceptions](https://noxlang.com/docs/language/exceptions/): Nox keeps Python's try/except/finally/raise syntax. Exceptions are ordinary classes; the error model underneath is not - [Concurrency](https://noxlang.com/docs/language/concurrency/): Nox's concurrency model is tasks and channels: lightweight fibers started with spawn, joined with await, and connected by typed - [Memory](https://noxlang.com/docs/language/memory/): There is no ownership syntax anywhere in Nox: no &, no move, no lifetimes, no Annotated[...], no read/mut/owned. - [Modules and packages](https://noxlang.com/docs/language/modules/): A module is a .nox file. A program is an entry file plus every module it imports, directly or transitively. All modules of a - [Decorators and reflection](https://noxlang.com/docs/language/decorators/): A decorator is a line starting with @ immediately before a def, a method or a class. - [Foreign functions](https://noxlang.com/docs/language/ffi/): Nox calls native code through extern def: a declaration of a function implemented outside Nox — in C, Zig, Rust (with a C ABI), or - [Built-in functions](https://noxlang.com/docs/language/builtins/): The prelude is everything available without an import. It consists of compiler built-ins and a small set of functions and classes - [Grammar](https://noxlang.com/docs/language/grammar/): A compact grammar of Nox. It is descriptive, not normative — the parser in compiler/parser/ is the definition — and it omits the lexical - [Differences from Python](https://noxlang.com/docs/language/python-differences/): Nox looks like Python and most small Python programs become Nox programs by adding type annotations. ## How-to guides - [How-to guides](https://noxlang.com/docs/howto/): Short, task-oriented pages: each one answers a single question and links to the reference for the details. - [Reduce binary size](https://noxlang.com/docs/howto/binary-size/): A Nox program is one native executable with the runtime linked in. - [Cross-compile](https://noxlang.com/docs/howto/cross-compile/): noxc build --target produces an executable for another system from any host that has zig on its PATH. - [Use the embedded C libraries](https://noxlang.com/docs/howto/embedded-c-libraries/): Six standard-library modules are backed by well-known C libraries that ship with Nox. ## The three APIs - [The three APIs](https://noxlang.com/docs/apis/): Nox deliberately separates what you may build on from what the compiler and runtime may change. - [NAPI — the Nox API](https://noxlang.com/docs/apis/napi/): NAPI is the contract between the Nox language/standard library and the people who build libraries and frameworks in Nox: web frameworks, - [NNI — the Nox Native Interface (v1)](https://noxlang.com/docs/apis/nni/): NNI is a C ABI that lets native code — C, C++, Rust, Zig — extend Nox programs without ever depending on how the runtime represents data. - [Writing a native plugin](https://noxlang.com/docs/apis/nni-guide/): This guide builds complete NNI plugins in C, Zig and Rust, loads them from Nox, adds a manifest, sends events from a native thread and - [The Plugin API](https://noxlang.com/docs/apis/plugin-api/): The Plugin API turns an NNI library into a product: something with a name, a version, a declared set of functions with types, and a - [The internal runtime ABI](https://noxlang.com/docs/apis/internal-abi/): Underneath the three public APIs sits a fourth layer that is not an API at all: the interface between the code the compiler generates, the Zig runtime - [Stability and compatibility](https://noxlang.com/docs/apis/stability/): This page is the single compatibility matrix for Nox 2.x. The long-form policy is in Versioning. ## Standard library - [The standard library](https://noxlang.com/docs/stdlib/): The standard library is written in Nox itself (stdlib/nox/*.nox) with thin Zig shims wherever the operating system is involved. - [nox.strings](https://noxlang.com/docs/stdlib/strings/): Function-style string utilities. Everything here is also available as methods on str (s.upper(), s.split(","), …; see - [nox.math](https://noxlang.com/docs/stdlib/math/): Floating-point mathematics backed by the C library's libm. - [nox.mathx](https://noxlang.com/docs/stdlib/mathx/): The same mathematical functions as nox.math, implemented without any C library. - [nox.bigint](https://noxlang.com/docs/stdlib/bigint/): Arbitrary-precision integers with Python semantics. - [nox.decimal](https://noxlang.com/docs/stdlib/decimal/): Exact decimal numbers for money and measurements, built on nox.bigint. - [nox.fraction](https://noxlang.com/docs/stdlib/fraction/): Exact rational numbers, built on nox.bigint. - [nox.argparse](https://noxlang.com/docs/stdlib/argparse/): Command-line argument parsing, modelled on Python's argparse. - [nox.fnmatch](https://noxlang.com/docs/stdlib/fnmatch/): Shell-style file name matching. - [nox.glob](https://noxlang.com/docs/stdlib/glob/): Expand file name patterns against the file system. - [nox.tempfile](https://noxlang.com/docs/stdlib/tempfile/): Temporary files and directories. - [nox.random](https://noxlang.com/docs/stdlib/random/): A fast general-purpose pseudo-random number generator (xoshiro256). - [nox.time](https://noxlang.com/docs/stdlib/time/): Wall-clock time, sleeping, calendar date-times and monotonic interval measurement. - [nox.tasks](https://noxlang.com/docs/stdlib/tasks/): Task groups: a dynamic number of tasks with a common result type, with waiting, limiting and cancelling. - [nox.property](https://noxlang.com/docs/stdlib/property/): Seeded property-based testing: generate many random inputs, check a property, and get a reproducible, size-reduced failure. - [nox.collections](https://noxlang.com/docs/stdlib/collections/): Data structures beyond the built-in list, dict and set: stacks, queues, deques, counters, ordered maps, an LRU cache, a binary heap and a priority - [nox.bits](https://noxlang.com/docs/stdlib/bits/): Bit manipulation on fixed-width integers: rotations, byte swaps, endianness conversion, and single-bit helpers. - [nox.buffer](https://noxlang.com/docs/stdlib/buffer/): Fixed-size byte buffers for systems and protocol code: network packets, file blocks, device buffers. - [nox.binary](https://noxlang.com/docs/stdlib/binary/): Cursor-based readers and writers for binary formats — file headers, network packets, on-disk structures — without raw pointers. - [nox.bytes](https://noxlang.com/docs/stdlib/bytes/): The bridge between a str and a raw byte buffer. - [nox.protobuf](https://noxlang.com/docs/stdlib/protobuf/): The Protocol Buffers wire format: a writer and a reader for the byte encoding, in pure Nox. - [nox.fs](https://noxlang.com/docs/stdlib/fs/): Files and directories: read, write, append, copy, rename, delete, list, and inspect. - [nox.path](https://noxlang.com/docs/stdlib/path/): Lexical operations on file-system path strings. Nothing here touches the disk except canonicalize. - [nox.os](https://noxlang.com/docs/stdlib/os/): Process-level information and control: command-line arguments, environment variables, the working directory and exit. - [nox.process](https://noxlang.com/docs/stdlib/process/): Run external programs and capture their output. - [nox.signal](https://noxlang.com/docs/stdlib/signal/): Subscribe to process signals: SIGINT, SIGTERM, SIGHUP, SIGUSR1, SIGUSR2. - [nox.terminal](https://noxlang.com/docs/stdlib/terminal/): Terminal control for full-screen and interactive programs: TTY detection, size, raw mode, echo, non-blocking input and raw output. - [nox.timezone](https://noxlang.com/docs/stdlib/timezone/): IANA time zones (Europe/Istanbul, America/New_York, …): UTC offset, abbreviation, daylight-saving flag, and conversion between UTC timestamps and local wall-clock time. - [nox.console](https://noxlang.com/docs/stdlib/console/): Levelled message printing without timestamps or any operating-system dependency — safe in every profile, including freestanding kernels. - [nox.log](https://noxlang.com/docs/stdlib/log/): Levelled logging with a millisecond timestamp on every line. - [nox.json](https://noxlang.com/docs/stdlib/json/): Parse and generate JSON. Parsing is done by a battle-tested native parser; the result is a tree of JsonValue nodes that you inspect with typed accessors. For - [nox.toml](https://noxlang.com/docs/stdlib/toml/): Parse and write TOML 1.0 documents. The parser is written in Nox; invalid input is rejected with a clear TomlError (including duplicate keys - [nox.yaml](https://noxlang.com/docs/stdlib/yaml/): Parse and write a practical subset of YAML — enough for configuration files. - [nox.csv](https://noxlang.com/docs/stdlib/csv/): Read and write CSV text following RFC 4180: comma-separated fields, optional double-quoted fields that may contain commas, quotes and line breaks, and "" as an - [nox.regex](https://noxlang.com/docs/stdlib/regex/): A backtracking regular-expression engine with the everyday subset of Python's re: groups and captures, alternation, counted and lazy - [nox.unicode](https://noxlang.com/docs/stdlib/unicode/): Unicode normalization (UAX #15) and locale-specific case mapping for Turkish and Azeri. - [nox.template](https://noxlang.com/docs/stdlib/template/): A minimal text template engine: {{ name }} placeholders replaced from a dictionary. - [nox.validate](https://noxlang.com/docs/stdlib/validate/): Validate JSON documents — typically HTTP request bodies — against a declarative schema. - [nox.url](https://noxlang.com/docs/stdlib/url/): Parse URLs, percent-encode and decode text, and build or read query strings. - [nox.base64](https://noxlang.com/docs/stdlib/base64/): Base64 encoding and decoding of text, in the standard and the URL-safe alphabets. - [nox.uuid](https://noxlang.com/docs/stdlib/uuid/): Random (version 4) and time-ordered (version 7) UUIDs. - [nox.crypto](https://noxlang.com/docs/stdlib/crypto/): Hashes, message authentication, secure randomness and password hashing — built on the Zig standard library's cryptography, with no external dependency. - [nox.ed25519](https://noxlang.com/docs/stdlib/ed25519/): Ed25519 detached-signature verification (RFC 8032), built on the Zig standard library. - [nox.jwt](https://noxlang.com/docs/stdlib/jwt/): JSON Web Tokens signed with HMAC-SHA-256 (HS256). - [nox.gzip](https://noxlang.com/docs/stdlib/gzip/): Compress and decompress gzip data (RFC 1952). - [nox.tar](https://noxlang.com/docs/stdlib/tar/): Read and write tar archives (ustar). - [nox.zip](https://noxlang.com/docs/stdlib/zip/): Read and write ZIP archives. - [nox.wasm](https://noxlang.com/docs/stdlib/wasm/): Run a WebAssembly module from Nox, with a persistent instance handle. - [nox.ffi](https://noxlang.com/docs/stdlib/ffi/): Closures and lambdas as C callbacks, and errno helpers for C error conventions. - [nox.zstd](https://noxlang.com/docs/stdlib/zstd/): Zstandard compression and decompression. - [nox.lz4](https://noxlang.com/docs/stdlib/lz4/): LZ4 frame compression: very fast, modest ratio (the same format as the lz4 command-line tool). - [nox.xxhash](https://noxlang.com/docs/stdlib/xxhash/): xxHash: extremely fast non-cryptographic hashes (cache keys, deduplication, sharding). - [nox.yyjson](https://noxlang.com/docs/stdlib/yyjson/): JSON reading and writing on top of yyjson (MIT), the fastest C JSON library. - [nox.pcre2](https://noxlang.com/docs/stdlib/pcre2/): Perl-compatible regular expressions on top of PCRE2 (BSD-3), with its JIT compiler. - [nox.brotli](https://noxlang.com/docs/stdlib/brotli/): Brotli decompression (HTTP Content-Encoding: br, .br files, WOFF2 payloads). - [nox.http](https://noxlang.com/docs/stdlib/http/): An HTTP/1.1 client and server. The server is part of the language runtime: connections run on lightweight tasks, the I/O reactor never blocks a worker, and a pool of - [nox.transfer](https://noxlang.com/docs/stdlib/transfer/): Stream HTTP bodies to and from files without holding them in memory. - [nox.router](https://noxlang.com/docs/stdlib/router/): Path routing and middleware for nox.http handlers, written in Nox. - [nox.web](https://noxlang.com/docs/stdlib/web/): Production building blocks for a nox.http backend, written in Nox: cookies, CORS, a rate limiter, request ids, an access log, security headers and response helpers. - [nox.websocket](https://noxlang.com/docs/stdlib/websocket/): WebSocket (RFC 6455) for both directions: a client that connects to ws:// and wss:// URLs, and the server-side connection object handed to a WebSocket handler by - [nox.udp](https://noxlang.com/docs/stdlib/udp/): UDP datagram sockets, for telemetry (statsd, syslog), discovery and simple request/response protocols. - [nox.dns](https://noxlang.com/docs/stdlib/dns/): Explicit DNS resolution. nox.http resolves a host name by itself while connecting, so a program that validates the address first (SSRF protection) would otherwise… - [nox.ip](https://noxlang.com/docs/stdlib/ip/): IPv4/IPv6 address parsing and classification — the "validate" step of a resolve → validate → connect defence against SSRF and DNS rebinding. - [nox.safehttp](https://noxlang.com/docs/stdlib/safehttp/): An HTTP client that is safe to point at untrusted URLs (webhooks, link previews, "fetch this image" features). - [nox.tls](https://noxlang.com/docs/stdlib/tls/): A client TLS stream: connect to a host and port, then read and write text over an encrypted connection. - [nox.smtp](https://noxlang.com/docs/stdlib/smtp/): An SMTP client for sending plain-text e-mail: connect, optionally upgrade with STARTTLS, authenticate and send. - [nox.db](https://noxlang.com/docs/stdlib/db/): The vocabulary shared by every SQL driver: Row and Statement classes, and the DbConnection protocol that nox.sqlite, nox.postgres and - [nox.sqlite](https://noxlang.com/docs/stdlib/sqlite/): An SQLite driver. It loads the system libsqlite3 at run time, the first time you call open, so programs that never use SQLite have no dependency on it; if the library is… - [nox.postgres](https://noxlang.com/docs/stdlib/postgres/): A PostgreSQL driver over libpq, loaded at run time on the first open (no link-time dependency; a missing library raises a clean PostgresError). - [nox.grpc](https://noxlang.com/docs/stdlib/grpc/): A gRPC client (HTTP/2 over plain TCP h2c, or over TLS with ALPN h2) written in Zig: no grpc library needed. - [nox.grpc_server](https://noxlang.com/docs/stdlib/grpc_server/): A gRPC server written in Nox on top of nox.http (HTTP/2: cleartext with prior knowledge, or TLS with ALPN h2 through the serve_tls* functions). - [nox.redis](https://noxlang.com/docs/stdlib/redis/): A Redis client (RESP2) written in Zig: no hiredis needed. Plain TCP or TLS from the first byte, AUTH (password or user + password), SELECT, byte-safe commands - [nox.redis_cluster](https://noxlang.com/docs/stdlib/redis_cluster/): A Redis Cluster client on top of nox.redis. It computes each key's hash slot (CRC16, with {hash tag} support), sends the command to the node that owns the slot, follows… - [nox.mysql](https://noxlang.com/docs/stdlib/mysql/): A MySQL / MariaDB driver over libmysqlclient (or the binary-compatible MariaDB connector), loaded at run time on the first open_url. - [nox.orm](https://noxlang.com/docs/stdlib/orm/): A micro-ORM: describe a table once, then create it and run parameterised insert/update/delete/select helpers over any DbConnection. - [nox.thread](https://noxlang.com/docs/stdlib/thread/): Explicit worker threads and thread-to-thread channels. The language's spawn / await already runs tasks in parallel under the default scheduler (Concurrency); - [nox.atomic](https://noxlang.com/docs/stdlib/atomic/): Process-wide atomic cells for sharing a counter or flag between workers. - [nox.sharedmem](https://noxlang.com/docs/stdlib/sharedmem/): Named shared-memory segments for communicating between separate operating-system processes (two noxc run invocations, a server and a helper). - [nox.mem](https://noxlang.com/docs/stdlib/mem/): Bulk typed-pointer memory operations and volatile access — a friendly facade over lowlevel and ptr[T], so ordinary code (device drivers, kernels, FFI buffers) does not… - [nox.reflect](https://noxlang.com/docs/stdlib/reflect/): Queries the metadata that decorators record, and class constructor signatures — the raw material for frameworks that wire routes, controllers and dependencies from… - [nox.native](https://noxlang.com/docs/stdlib/native/): The Nox side of the Nox Native Interface: load a native plugin (a shared library exporting nox_plugin_init_v1), call the functions it registered, and receive events from… - [nox.plugin](https://noxlang.com/docs/stdlib/plugin/): The Nox side of the Plugin API: load a native plugin through a nox-plugin.json manifest, with API-version negotiation, platform library selection, typed call checking, a… - [nox.hpy](https://noxlang.com/docs/stdlib/hpy/): Load an aHPy Universal package (nox-hpy-host-v1). The facade opens the manifest, checks the artifact for this machine, and calls the extension. It never hands out a raw… - [nox.test](https://noxlang.com/docs/stdlib/test/): Assertions and a result-collecting test suite. noxc test runs every *_test.nox file (see Testing); inside those files use the functions below. ## Tools - [noxc — the compiler and project tool](https://noxlang.com/docs/tools/noxc/): noxc is the single command that checks, compiles, runs, formats, tests and packages Nox programs. - [Compilation backends](https://noxlang.com/docs/tools/backends/): Nox compiles the typed program to one of two back ends, which are tested against the same corpus and must produce identical program output. - [Packages and dependencies](https://noxlang.com/docs/tools/packages/): A Nox *package* is an ordinary project in a Git repository. A project lists the packages it needs in nox.json; noxc fetches them, pins exact commits in nox.lock, and… - [noxpkg — the central package index](https://noxlang.com/docs/tools/noxpkg/): noxpkg is the registry service behind noxc search, noxc add and noxc publish. - [Testing](https://noxlang.com/docs/tools/testing/): noxc test finds every file named *_test.nox under the current directory, compiles and runs each as its own program, and reports one line per file and a summary. - [The formatter](https://noxlang.com/docs/tools/formatter/): noxc fmt file.nox rewrites a file in place in the standard Nox style. - [The language server (noxlsp)](https://noxlang.com/docs/tools/lsp/): noxlsp is a Language Server Protocol server for Nox that speaks JSON-RPC over standard input/output. - [Debugging](https://noxlang.com/docs/tools/debugging/): print renders every value structurally — lists, dictionaries, tuples, sets and class instances (Name(field=value, …)) — so print(obj) is usually enough. - [Freestanding builds](https://noxlang.com/docs/tools/freestanding/): Nox can compile programs that run with no operating system — kernels, firmware, bootloaders — by linking a freestanding runtime and importing only modules that need no… - [noxc bindgen](https://noxlang.com/docs/tools/bindgen/): Generate Nox bindings from a C header. - [WebAssembly](https://noxlang.com/docs/tools/wasm/): Nox programs compile to WebAssembly, and the compiler itself runs as WebAssembly in a browser tab (Playground). - [The Playground (beta)](https://noxlang.com/docs/tools/playground/): The Playground lets you write, compile and run Nox in a browser tab. - [The Nox compiler in the browser](https://noxlang.com/docs/tools/browser-compiler/): The whole Nox compiler runs as WebAssembly: source code is compiled to .wasm in the browser (or in Node) and run there. ## Internals - [Architecture](https://noxlang.com/docs/internals/architecture/): This section explains how Nox is built, for contributors and the curious. - [The compiler front end](https://noxlang.com/docs/internals/compiler/): compiler/lexer/lexer.zig turns source text into tokens, including explicit INDENT/DEDENT tokens. - [The type checker](https://noxlang.com/docs/internals/type-checker/): compiler/typecheck/checker.zig enforces mandatory static typing and produces the information code generation needs. - [Ownership analysis](https://noxlang.com/docs/internals/ownership/): Nox's memory model has no user syntax; the compiler decides, per value, the cheapest safe strategy. - [Code generation](https://noxlang.com/docs/internals/codegen/): compiler/codegen_qbe/ turns the checked, rewritten AST into IR. - [Global durum denetimi](https://noxlang.com/docs/internals/global-state-audit/): AGENTS §2.6: runtime gizli/global mutable durum taşımaz, ayırıcıları açıkça alır. - [The runtime](https://noxlang.com/docs/internals/runtime/): The runtime is written in Zig and statically linked into every program (noxrt.o; noxrt-freestanding*.o for kernels). - [The scheduler](https://noxlang.com/docs/internals/scheduler/): Tasks are fibers: small stacks and a hand-written context switch. - [HPy host v1 and WebAssembly](https://noxlang.com/docs/internals/hpy-wasm/): Nox can load a native extension that was produced for the nox-hpy-host-v1 profile. - [HPy and CPython compatibility: what exists](https://noxlang.com/docs/internals/hpy-tier-gap/): AGENTS §10 describes a tiered target (Tier 0–3) for HPy/CPython extensions. - [WebAssembly coverage](https://noxlang.com/docs/internals/wasm-coverage/): runtime/wasm_bridge/ is a library import (an embedded interpreter that loads WASM modules into a Nox program). - [Testing internals](https://noxlang.com/docs/internals/testing/): Nox is tested far more heavily than a typical language implementation of its size: roughly 1,200 tests in 180 build steps, plus opt-in stress suites. - [Contributing](https://noxlang.com/docs/internals/contributing/): Nox is open source (MIT). This page summarises how to work on the compiler and runtime; the binding rules are in AGENTS.md in the repository, which applies equally to… - [Releasing](https://noxlang.com/docs/internals/releasing/): How a version reaches users, and the gates in between. - [Deploying noxlang.com and the registry](https://noxlang.com/docs/internals/deployment/): This page documents how the project's own web presence is run: the noxlang.com site and the noxpkg package registry. - [Mobil toolchain](https://noxlang.com/docs/internals/mobile-toolchain/): Sayılar bu makinede okundu. Uydurulmadı. - [Mobil destek matrisi](https://noxlang.com/docs/internals/mobile-matrix/): Hiçbir mobil hedef supported değildir. Stable kapısı aşağıdakilerin hepsi geçmeden açılmaz. - [ADR-MOB-001 Kütüphane modeli](https://noxlang.com/docs/internals/adr/001-library/): Durum: kabul. Mobil hedef bir yürütülebilir dosya üretmez. - [ADR-MOB-002 Hedef adları](https://noxlang.com/docs/internals/adr/002-targets/): Durum: kabul. Dört ad birleşmez. - [ADR-MOB-003 İş parçacığı ve fiber](https://noxlang.com/docs/internals/adr/003-threads/): Durum: kabul. Mobil async tek iş parçacığındaki fiber zamanlayıcısında çalışır. - [ADR-MOB-004 Yetenek maskesi](https://noxlang.com/docs/internals/adr/004-capabilities/): Durum: kabul. Üçüncü bir profil yoktur. - [ADR-MOB-005 Bağlama](https://noxlang.com/docs/internals/adr/005-linking/): Durum: kabul. - [ADR-MOB-006 Olay kuyruğu](https://noxlang.com/docs/internals/adr/006-events/): Durum: kabul. Kamuya açık başlık bu karardan sonra include/nox_embed.h oldu. - [ADR-MOB-007 Tanı](https://noxlang.com/docs/internals/adr/007-diagnostics/): Durum: kabul. - [ADR-MOB-008 Backend](https://noxlang.com/docs/internals/adr/008-backend/): Durum: kabul. Mobil backend LLVM'dir. - [ADR-MOB-009 Gömme ayırıcısı ve hata sözleşmesi](https://noxlang.com/docs/internals/adr/009-embed-allocator/): Durum: kabul (v2.0.32). - [ADR-010 Güvenilmeyen kaynak: `noxc run --sandbox`](https://noxlang.com/docs/internals/adr/010-sandbox/): Durum: kabul (v2.0.43). Kapsam: TODO 7.2 ve 7.3. - [ADR-011 `nox.lock` imzalama](https://noxlang.com/docs/internals/adr/011-lock-signing/): Durum: kabul (v2.0.43). Kapsam: TODO 7.1. - [ADR-012 WASM derleme hedefi](https://noxlang.com/docs/internals/adr/012-wasm-target/): Durum: kabul. Nox kodu --target wasm32-wasi ile LLVM üzerinden WebAssembly'ye derlenir. - [ADR-013 `wasm32-freestanding` ve `nox_host`](https://noxlang.com/docs/internals/adr/013-wasm-host/): Durum: kabul (kullanıcı kararı: Nox'a özel import ad alanı). --target wasm32-freestanding, WASI'ye ve libc'ye bağlı olmayan bir WebAssembly modülü üretir; dış dünya… - [ADR-014 WASM'da gerçek fiber: Asyncify](https://noxlang.com/docs/internals/adr/014-wasm-asyncify/): Durum: kabul (kullanıcı kararı: "thread kipi olmayanlar için Asyncify"). - [ADR-015 WASM'da gerçek paralellik: `--threads`](https://noxlang.com/docs/internals/adr/015-wasm-threads/): Durum: kabul (kullanıcı kararı: "wasi-threads tarzı gerçek M:N; host tarafını kendi API'mizle yazalım"). - [ADR-016: WASM'da host yetenekleri ve derleme zamanı yetenek yasağı](https://noxlang.com/docs/internals/adr/016-wasm-capabilities/): Durum: kabul edildi (2026-11-04). Bağlam: ADR-012 (hedef), ADR-013 (nox_host). ## Reference - [Platforms](https://noxlang.com/docs/reference/platforms/): What is supported, what is tested, and the known gaps. - [Security model](https://noxlang.com/docs/reference/security/): Nox gives you memory safety and static typing inside the language. - [Versioning and stability policy](https://noxlang.com/docs/reference/versioning/): This is the long-form policy; Stability and compatibility summarises it as a matrix. - [Environment variables](https://noxlang.com/docs/reference/environment/): Programs read their own environment with nox.os.getenv; nothing else in the standard library depends on environment variables. - [Symbol names](https://noxlang.com/docs/reference/symbols/): A top-level Nox def becomes a global symbol in the object file, under its plain name ($name in QBE, @name in LLVM). - [Frequently asked questions](https://noxlang.com/docs/reference/faq/): Is Nox just Python? The syntax is Python's, but Nox is statically typed and compiled to native code. - [Glossary](https://noxlang.com/docs/reference/glossary/): ARC — automatic reference counting. Layer 2 of the memory model: a value carries a count of its owners and is freed when the count reaches zero.