Object-Capabilities & Safety
In Mo, a function cannot perform I/O unless a capability value is passed explicitly in its signature. Top-level main receives only the capabilities it declares:
Args,Env,ConsoleFiles,ReadFiles,Files.File— directory-confined via Linuxopenat2RESOLVE_BENEATHor component-wiseO_NOFOLLOWtraversal (never escaping via..or symlinks)Clock,Random,SecureRandomNetwork,Connection— TCP + TLS 1.2+ via pure-Rustrustlswith system rootsSqlite,Sqlite.Database— bundled SQLite with WAL mode,PRAGMA foreign_keys = ON, directory confinement, and authorizer blockingATTACH/VACUUM INTO/extensionsCommand— shell-free subprocess execution backed by Linux Landlock + seccomp child confinement
Monotonic Narrowing
Section titled “Monotonic Narrowing”Capabilities can only become narrower, never wider:
files.within("reports").read_onlynetwork.allow_hosts(["api.github.com:443"])command.within(dir).allow_programs(["git"])
mo diff flags any capability authority expansion automatically in code review.
Zero-I/O Deterministic Fakes
Section titled “Zero-I/O Deterministic Fakes”Every capability has an in-memory spec double (Console.fake(), Files.in_memory(...), Clock.fixed(...), Random.seeded(...), Network.fake(...), Sqlite.in_memory(), Command.fake(...)). The MOBC v0.3 bytecode verifier rejects fake constructors outside spec blocks so production builds can never forge authority.
100% Pure Safe Rust Toolchain
Section titled “100% Pure Safe Rust Toolchain”All 17 workspace crates enforce #![forbid(unsafe_code)], unwrap_used = "deny", zero OpenSSL, and zero dynamic libsqlite3.