Installation
Get the nurlc compiler via a prebuilt toolchain or build it from source.
You can get NURL in two ways: install a prebuilt toolchain, or build it from the source code.
Option A — Prebuilt toolchain (Linux / macOS / FreeBSD / Windows)
Prebuilt archives ship for Linux (x86_64, aarch64), macOS (ARM64, x86_64), FreeBSD (x86_64), and Windows (x86_64). Installing gives you nurl (the one-step build and run wrapper), nurlc (compiler), nurlpkg (package manager), and nurlfmt (source formatter) on your PATH, plus stdlib/ and lib/runtime.native.o (and on Windows, a bundled zig cc + runtime.mingw.o).
One-command install
Linux / macOS / FreeBSD
curl -fsSL https://nurl-lang.org/install.sh | shWindows (PowerShell)
irm https://nurl-lang.org/install.ps1 | iexKeeping it up to date
Once the toolchain is installed it upgrades itself — you never need the one-liner again:
nurl upgrade # fetch + install the newest release
nurl upgrade --check # is there a newer one? (installs nothing)nurl update and nurlpkg self-update are the same command under the
names people tend to guess. It is not nurlpkg update, which moves your
project's dependency requirements.
The upgrade replaces only the toolchain's own files. Everything else in
$NURL_HOME (default ~/.nurl) is left alone: your registry token, the
model cache under models/, and every program you installed with
nurlpkg install. Two other flags matter occasionally:
| Flag | Effect |
|---|---|
--version vX.Y.Z | Install one specific release — pin it, or go back |
--force | Reinstall the version you already have, or replace a source build |
Each release archive is checked against its published SHA-256, and against
its minisign signature when minisign is on your PATH; a mismatch aborts
before anything is unpacked.
CI builds, bootstraps, and tests Linux x86_64, FreeBSD 14.2 x86_64, Windows x86_64, macOS ARM64, and Unikernels (x86_64, AArch64, RISC-V64) on every change. Each prebuilt archive includes nurl, nurlc, nurlpkg, nurlfmt, stdlib/, and lib/runtime.native.o (plus bundled zig cc and runtime.mingw.o on Windows) so you can compile .nu files directly out of the box.
Option B — Build from source
Build from source if you are hacking on the compiler or standard library, or targeting a platform without a prebuilt archive (such as Alpine/musl).
Prerequisites
NURL's compiler emits LLVM IR text; clang turns that into a native binary.
clang is the only build-time dependency.
| OS | Command |
|---|---|
| Linux | Use distribution's package manager |
| macOS | brew install llvm (then add it to PATH — see below) |
| Windows | Install from llvm.org/releases |
| FreeBSD | already ships clang; also install bash for build.sh |
On macOS, brew does not symlink LLVM onto PATH by default. Add this line to ~/.zshrc to persist it.
export PATH="$(brew --prefix llvm)/bin:$PATH"Clone and build
git clone https://github.com/nurl-lang/nurl.git
cd nurl
./build.sh # Linux / macOS / FreeBSD
build.bat # Windows./build.sh does a full bootstrap: it compiles the C runtime,
links a committed known-good compiler snapshot, and uses that snapshot to
compile the current compiler source. It then compiles the result again
and checks that both self-compiles produce byte-for-byte identical output
before it accepts the build. On success it prints BUILD SUCCESS & TESTS PASSED
and puts the compiler at build/nurlc (symlinked at the repo root).
The compiler (compiler/nurlc.nu) is written in NURL. To show that a change
to the compiler did not silently break itself, build.sh compiles the
compiler source with itself, then does it again with the result of
the first pass, and needs the two outputs to be byte-identical. This
"fixed point" check is the same idea GCC and Zig use to validate a
self-hosting compiler.
Optional: language server + editor extension
./install.shRun from the repo root after ./build.sh — it
bootstraps the compiler if needed, builds nurl-lsp, symlinks it onto your
PATH, and installs the VS Code extension if code (or cursor /
windsurf) is available. Safe to re-run any time. See
docs/TOOLING.md for manual editor setup and other editors.
Verifying the install
./build/nurlc --version # after a source build
nurlc --version # after the prebuilt installerLast updated on