An actor-based language with algebraic effects, capability-based types, and durable/distributed actors — built for software that outlasts a process.
Website • Nulang Cloud • GitHub
Nulang is an actor-based programming language with algebraic effects and
capability-based types. It fuses Erlang-style fault-tolerant actors with a
Hindley-Milner type system, reference capabilities (iso/trn/ref/val/box/tag/lineariso),
and row-polymorphic algebraic effects. The compiler pipeline (AST → HIR → MIR)
targets a register-based bytecode VM with a Cranelift JIT, an ahead-of-time
native backend, and an optional WASM backend. The runtime is a multi-threaded
work-stealing executor with supervision trees, ORCA garbage collection,
location-transparent distribution, and durable persistence.
Download the latest release from GitHub Releases.
- Linux (x86_64):
nulang-linux-x86_64.tar.gz - Linux (aarch64):
nulang-linux-aarch64.tar.gz - macOS (x86_64):
nulang-macos-x86_64.tar.gz - macOS (aarch64):
nulang-macos-aarch64.tar.gz
Extract and place nulang in your PATH:
tar xzf nulang-linux-x86_64.tar.gz
sudo mv nulang /usr/local/bin/git clone https://github.com/dporkka/nulang.git
cd nulang
cargo build --releaseRequires Rust 1.93+, Linux or macOS.
Prerequisites: Rust 1.93+, Linux or macOS (Windows planned).
git clone https://github.com/dporkka/nulang.git
cd nulang
cargo build --releasenulang hello.nula # compile + run
nulang --check hello.nula # type-check only
nulang --eval '40 + 2' # evaluate inline code
nulang --repl # interactive REPLA Nulang program:
perform IO.print("Hello, Nulang!")
let name = "World"
perform IO.print("Hello, " + name + "!")
Run
nulang examples/01_hello.nula. Seeexamples/for 17 verified programs covering actors, effects, pattern matching, records, loops, arrays, HTTP, JSON, and more.
- Algebraic effects —
perform Effect.op(args)/handle body with { | Effect.op(x) => ... }with resume semantics. Effect dependencies are explicit in function signatures via!rows. - Capability-based types —
iso,trn,ref,val,box,tag, andlinearisoguarantee memory safety and data-race freedom. Checked at compile time; erased at runtime. - Hindley-Milner type inference — full Algorithm W with row-polymorphic records, variant types, and algebraic effect rows.
- Actors —
spawn,send/!,ask, selectivereceivewithaftertimeout, links, monitors, supervision trees, process groups, and actor priority scheduling. - Entities & workflows —
entitydeclarations (durable-first, event-sourced by default).workflowdeclarations with steps, timers, signals, and saga compensation that survive restarts. letandvar— immutable and mutable bindings. Records with{ field: value }syntax and{ base .. field = new_val }update syntax. Pattern matching with guards, alias patterns, and recursive sub-patterns.**exponentiation. Multi-line"""..."""strings with\u{...}unicode escapes. Pipe operator|>.- Error handling —
catch expr fallback(prefix or postfix),fail Error(...)for structured short-circuit return,T ! Ereturn types,?unwrap. - FS file I/O —
perform FS.read(path),perform FS.write(path, content),perform FS.append(path, content),perform FS.exists(path). - Package manager —
nula new/init/build/run/test/add/remove/list/clean/doc. See below. - Test runner —
nula testdiscovers.nulafiles undertests/; uses theTesteffect (perform Test.assert_eq(a, b),perform Test.assert(cond, msg), etc.). - LSP server —
nulang --lspwith diagnostics, hover, goto-definition, references, rename, completion, inlay hints, formatting, signature help, and semantic tokens. - REPL —
nulang --replwith:help <topic>,:type <expr>,:load <file>, tab completion, and automatic multi-line input. - AI runtime —
agentdeclarations, LLM providers (OpenAI, Ollama), episodic/semantic/procedural memory, pipelines, debates, and supervisor teams. Gated behind theai-runtimefeature flag. Experimental. - Distribution — location-transparent
send/askover TCP (NUL0 wire protocol), gossip membership, 8 CRDT types. Experimental. - WASM backend — MIR→WASM compilation via
--backend wasm|wasm-run|wasm-aot, Wasmtime host runtime with guard pages and SIMD. Gated behind thewasm-backendfeature flag. Experimental. - AOT native backend —
--backend nativecompiles pure-functional programs (no effects, actors, or FFI) to native code via Cranelift; other constructs fail with a specific "not yet supported in the native backend" error naming the construct. Use the defaultbytecodebackend for full-language programs. Experimental.
| Document | Description |
|---|---|
docs/GETTING_STARTED.md |
Installation, values, effects, actors, pattern matching — with runnable code snippets |
docs/TUTORIAL.md |
Tutorial: Build a Weather CLI step by step — variables, functions, HTTP, JSON, pattern matching, records, file I/O |
docs/PITFALLS.md |
Common mistakes: :: vs ., let vs var, perform keyword, catch/fail, record syntax, and more |
examples/ + README |
17 verified, self-contained example programs |
SPEC2.md |
Language specification: syntax, semantics, type system, runtime, format stability contract |
CHANGELOG.md |
Changelog organized by stability tier (Frozen / Stable / Experimental) |
GOVERNANCE.md |
Stability tiers, RFC process, and language versioning |
ARCHITECTURE.md |
Implementation architecture and module map |
RFC/ |
RFC proposals (format stability, frozen core, deprecation cycles, roadmap) |
Nulang ships with nula, a package manager invoked as nulang nula <subcommand>:
nulang nula new my-app # scaffold a new package
nulang nula init # initialize a package in the current directory
nulang nula build # resolve dependencies + type-check
nulang nula run # build and run the entry point
nulang nula test # discover and run tests/ directory
nulang nula add <name> # add a dependency (--path, --git, --version)
nulang nula publish # publish the package to a registry
nulang registry serve # run a local package registry server
nulang nula remove <name> # remove a dependency
nulang nula list # list locked dependencies
nulang nula clean # remove build artifacts
nulang nula doc # generate Markdown API docsNulang is alpha software. The language version is 1.0.0-frozen
(RFC 0001/0002). Every public surface is classified into one of three tiers
(see GOVERNANCE.md for the full definitions):
| Tier | Scope |
|---|---|
| Frozen | Never breaks — .nbc bytecode format, NUL0 wire protocol, value layout, Nulang Core, and the IO/Spawn/Send/Receive built-in effects. |
| Stable | HM type system, effect rows, capability lattice, actor surface, CRDT operations. Breaking changes require an RFC and a deprecation cycle. |
| Experimental | Everything else — feature flags (wasm-backend, python, sqlite, lsp, ai-runtime) and items marked Experimental in CHANGELOG.md. |
1550+ tests pass with cargo test. Add --features wasm-backend for the
WASM backend test suite.
Nulang Cloud is an optional managed platform for running Nulang actors in production — auto-scaling, zero cold start, managed durability, and location-transparent messaging across regions.
The language and runtime in this repository are Apache-2.0 and fully self-hostable. No lock-in.
A multi-stage Docker image is available. Build and run:
docker build -t nulang .
docker run --rm nulang --eval 'perform IO.print("Hello from Docker!")'The image is ~50 MB and contains only the nulang binary and its runtime
dependencies.
Nulang is licensed under the Apache License, Version 2.0.
Copyright 2026 © David Porkka