Skip to content

Nirdosha vs Alternatives

Arun Soman edited this page Sep 2, 2026 · 1 revision

Nirdosha vs. Rust, Go, Mojo

Nirdosha isn't trying to be a better Rust; it gives up Rust's full expressiveness in exchange for a grammar an LLM can be forced to stay inside, and a concurrency model where whole bug classes are unrepresentable rather than merely unlikely.

Nirdosha Rust Go Mojo
Target use case Deterministic backend services, compliance CRUD, LLM-written agents General-purpose systems: kernels, browsers, databases, embedded Cloud-native services, DevOps tooling AI/ML-first, Python-compatible kernels for CPU/GPU
Memory management Affine ownership (box/&), single-owner heap, no GC Ownership + borrowing + lifetimes, no GC in safe code Tracing GC Ownership/borrowing (Rust-inspired) + Python dynamic layer
Data-race freedom Static — no shared mutable state, no aliasing Static — borrow checker rules them out Not statically guaranteed (go test -race is dynamic-only) Not yet fully guaranteed
Deadlock freedom Lock-ordering: proof-by-construction (no mutex primitive at all). recv/join: real runtime detection — a join-cycle or every live thread simultaneously blocked traps immediately with a diagnostic, not full static prevention Possible — Mutex/Condvar/async can deadlock Possible — channels + sync.Mutex can deadlock; the runtime detects only the case where every goroutine is asleep, not a partial deadlock among some of them Not a current guarantee
LLM writability LL(1) grammar exported to GBNF for constrained decoding; structured JSON diagnostics LLMs default to Python 90–97% of the time; Rust's API churn compounds it Easy to generate syntactically; no constrained decoding or proof obligations built in Easy for Python-like snippets; no published GBNF/constrained-decoding integration
Maturity Active public research prototype Production-ready, decade of hardening Production-ready, huge ecosystem Pre-1.0, stabilizing

The honest answer to "why not just use Rust, Go, or Mojo?"

Those languages already solve memory safety and concurrency for teams that can invest in their learning curve. Nirdosha targets a different, narrower problem: AI agents writing backend code unsupervised, where the grammar itself has to make invalid syntax and whole bug classes impossible to emit, not just unlikely.

Concretely, none of Rust, Go, or Mojo ship the thing an unsupervised agent actually needs most: a formally decidable grammar with a published, tested constrained-decoding artifact (GBNF or equivalent) that a sampler can load today, and a structured (not prose) diagnostic format an agent can feed back into a repair loop programmatically. Rust's own ecosystem data point is blunt: LLMs default to generating Python 90–97% of the time regardless of the target domain, and Rust's own API churn compounds the problem when they don't. That's not a claim about Rust being a bad language — it's a claim about what a default choice actually optimizes for, which is training-corpus mass, not grammar decidability.

If you love Rust, keep using it — Nirdosha is a research bet on a different user, not a replacement. See Who It's For for the precise boundary, and LLM Integration for the mechanism this table's "LLM writability" row is actually pointing at.

Clone this wiki locally