Why I Built Mo (v0.6.0): Pure Safe Rust, Perceus Reuse & Zero Ambient Authority
Designing a calm, capability-safe language and actor runtime for AI-assisted engineering—stress-tested by building Arvo, MoDB, Motet, Mosh, Vellum, and Mobrowse.
When AI agents start writing a larger share of application code, traditional trade-offs between dynamism, memory safety, and operational clarity break down. Scripting languages let any third-party package open sockets or touch environment variables silently; systems languages give strong memory guarantees while slowing down application iteration; actor runtimes isolate crashes yet still grant ambient authority.
Mo (v0.6.0) is my answer: a programming language and single-binary runtime written in 100% pure safe Rust (#![forbid(unsafe_code)]) with zero OpenSSL and zero system libsqlite3, documented at mo.robertguss.com.
Four Design Decisions Behind Mo
1. Calm Syntax Built for Human Review
Inspired by Ruby and Elixir’s readability, .mo files favor explicit module, struct, enum, fn, and end blocks with single-cause diagnostics (E####) and canonical mo fix formatting—kept unambiguous so both humans auditing diffs and coding agents editing code stay aligned.
2. Value Semantics + Perceus In-Place Reuse
Instead of manual borrow-checker lifetimes or stop-the-world GC pauses, Mo gives programmers immutable algebraic types (struct/enum), exhaustive case matching, explicit Option/Result, exact 128-bit Decimal arithmetic, and Koka-style Perceus reference counting with opportunistic in-place memory reuse (RESET/REUSE/SET_FIELD).
3. Zero Ambient Authority + Zero-Socket Tests
Functions in Mo cannot reach the filesystem, network, clock, or UI on a whim. main declares capabilities explicitly and passes narrowed handles down (within, read_only, allow_hosts, allow_programs). Every runtime capability swaps cleanly for a deterministic in-memory fake—meaning full HTTP routes and actors (api + actor) test in-process with zero sockets via ApiTest.send.
On top of that foundation, every function can embed inline examples ... end assertions and runtime-checked promise ... end contracts verified by mo test, backed by Lean 4 Core soundness proofs, a Bison LR(1) grammar, and TLA+ actor protocol models.
4. Native Display GUI & Standalone App Bundling (v0.5.0–v0.6.0)
Recent releases extend capability-safe ergonomics beyond CLI and web backends: v0.5.0 introduced the Display GUI capability and mo install --app desktop bundler, and v0.6.0 adds native file dialogs, menu bar & keyboard shortcut events, and custom font loading to Display.
Stress-Tested by a Real Pure-Mo Ecosystem
Rather than keeping Mo as a compiler benchmark toy, every feature in the runtime was driven by building real tools in Mo itself:
- Arvo: Full-stack web framework with SQLite WAL, Inertia v2 (React 19 + TypeScript + Tailwind v4), AES-256-GCM sessions, CSRF protection, migrations, and durable jobs in one binary.
- MoDB: Embedded Copy-on-Write B+Tree database with per-page SHA-256 checksums, hash-chained audit ledgers, and deterministic replay.
- Motet & Mosh: AI assistant roster with physically isolated secret vaults (
Motet) and a deterministic-first coding agent harness (Mosh). - Vellum & Mobrowse: Collaborative workspace with 17 MCP tools (
Vellum) and a zero-Chromium browser engine written in Mo (Mobrowse).
Try Mo v0.6.0
brew install robertguss/tap/mo
brew install robertguss/tap/arvo
Read Why Mo, explore Object-Capabilities & Safety, or sponsor open-source development.