Nulang
Why Nulang?
Section titled “Why Nulang?”Building reliable distributed systems today usually means stitching together actors, queues, databases, workflow engines, and observability tools. Nulang integrates those capabilities into the language itself so you can focus on your application logic instead of infrastructure plumbing.
Build software that heals
Section titled “Build software that heals”Nulang’s actor model and supervision trees mean failures are isolated and restarted automatically. A bad message or a crashing service doesn’t take down the whole system.
Distribute without rewriting
Section titled “Distribute without rewriting”Actors communicate through location-transparent messages. Move a service from one node to many, and the code stays the same.
Ship AI agents with memory
Section titled “Ship AI agents with memory”Declare agents as language primitives with built-in LLM integrations, episodic/semantic/procedural memory, pipelines, debates, and supervisor teams.
Survive restarts
Section titled “Survive restarts”Workflows checkpoint durable state and use saga compensation to roll back safely when a step fails.
Stay safe and fast
Section titled “Stay safe and fast”Reference capabilities and per-actor garbage collection give you memory safety without global stop-the-world pauses, while the JIT and native AOT backends keep hot paths fast.
Open Source
Section titled “Open Source”Nulang is open source and licensed under the Apache 2.0 license. The source code, issue tracker, and contribution workflow live on GitHub.
View Apache 2.0 License
Distributed Actors
Location-transparent actors with BEAM/OTP primitives — spawn, link, monitor, supervise. Automatic clustering with gossip membership and CRDT state replication.
Algebraic Effects
Koka-inspired row-polymorphic effects with compile-time checking. Handle, perform, resume — algebraic effect handlers compose freely without monad transformers.
Row-Polymorphic Types
Full Hindley-Milner type inference with row polymorphism for both records and effects. Pony-inspired reference capabilities (iso, trn, ref, val, box, tag) enforced at compile time.
BEAM/OTP Primitives
Supervision trees (one_for_one, one_for_all, rest_for_one, simple_one_for_one), process groups, named registration, and exit trapping — battle-tested fault tolerance patterns.
WASM Backend
Compile to WebAssembly with full MIR→WASM translation. Run in Wasmtime with 4GiB guard pages, SIMD support, and AOT compilation for near-native performance.
AI Runtime
Built-in LLM integration with provider-agnostic API (OpenAI, Ollama). Agent pipelines, debate teams, supervisor hierarchies, and episodic/semantic/procedural memory.
Quick Example
Section titled “Quick Example”// A simple counter actoractor Counter { state count: Int = 0
behavior inc() { self.count = self.count + 1 }
behavior get(sender: Actor) { send sender reply(self.count) }}
// Spawn and use itlet counter = spawn Counter {} in { send counter inc() send counter inc() // counter.count is now 2 counter}Installation
Section titled “Installation”# Clone and build from sourcegit clone https://github.com/dporkka/nulang.gitcd nulangcargo build --release
# Start the REPLcargo run -- --replSupport
Section titled “Support”Nulang is open source under the Apache 2.0 license. If you find it valuable, consider supporting its development.