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 / FreeBSD / Windows)
This gives you nurlc (compiler), nurlpkg (package manager), and
nurlfmt (source formatter) on your PATH.
One-command install
Linux / 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.
NURL's CI now builds and tests on Linux and FreeBSD only. NURL supports macOS, but has no CI coverage or prebuilt toolchain for running on macOS yet. You must build from source on macOS for now.
Option B — Build from source
You need this for macOS. We also recommend this if you want to compile your
own .nu files right away.
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