Installation
Prerequisites
Section titled “Prerequisites”- Rust 1.95.0 (pinned by
rust-toolchain.toml; rustup) - Python 3 development headers (for PyO3 interop)
- Linux or macOS. Windows is not supported yet — use WSL and build inside a Linux environment.
- A C compiler and linker (GCC/Clang + GNU
bfdlinker on Linux)
Building from Source
Section titled “Building from Source”git clone https://github.com/nulang-org/nulang.gitcd nulangcargo build --releaseThe release build uses opt-level=3, LTO, and single codegen-unit for maximum performance. A debug build (cargo build) is faster to compile but runs ~10x slower.
Feature Flags
Section titled “Feature Flags”Nulang supports optional features for leaner builds:
# Minimal build (no Python, SQLite, LSP, AI runtime, or networking)cargo build --release --no-default-features
# With WASM backendcargo build --release --features wasm-backend
# All featurescargo build --release --all-features| Feature | Default | Description |
|---|---|---|
native-codegen |
On | Cranelift-backed tiered JIT and the native/AOT backend |
python |
On | PyO3 Python interop |
sqlite |
On | libsql/Turso persistence |
lsp |
On | tower-lsp language server |
ai-runtime |
On | AI runtime — LLM providers, pipelines, debates, supervisor teams |
tls |
On | TLS support for the TCP transport |
ffi |
On | Dynamic native library loading (extern FFI) via libloading/libffi |
tcp |
On | Raw TCP networking — distributed-actor transport, HTTP server, metrics/registry/DAP servers |
ureq |
On | Synchronous HTTP client for Http.get/Http.post, the registry client, and nula deploy |
wasm-backend |
Off | WASM compiler + Wasmtime runtime (enables --backend wasm|wasm-run|wasm-aot) |
wasmfx-backend |
Off | WasmFX stack-switching backend for suspending effects (requires wasm-backend) |
http-client |
Off | Async HTTP client (reqwest) |
rocksdb |
Off | RocksDB persistence backend |
postgres |
Off | PostgreSQL persistence backend |
otel |
Off | OpenTelemetry observability |
difffuzz |
Off | Differential fuzzing driver binary |
Verifying the Build
Section titled “Verifying the Build”# Run the test suitecargo test
# Start the REPLcargo run -- --repl
# Run a Nulang programcargo run -- examples/fibonacci.nulaSystem-Specific Notes
Section titled “System-Specific Notes”Fedora Linux
Section titled “Fedora Linux”Install Python development headers:
sudo dnf install python3-develThe build.rs script automatically creates a libpythonX.Y.so symlink for PyO3 linking.
Install Python via Homebrew:
brew install python@3.14Next Steps
Section titled “Next Steps”Now that Nulang is installed, follow the Quick Start guide to write your first program, and set up your editor with the VS Code extension or the language server.