Mighty Documentation¶
Mighty is a statically typed, ownership-based, agent-first systems language that compiles to native code and to WebAssembly components. These docs cover the language at toolchain v0.49 tracking spec v1.0-RC5.
Pre-1.0 warning. The language surface is frozen for v1.0 but the binary distribution is still pre-release (cargo-install + PGO release binaries on Linux/macOS-x86_64/Windows; homebrew formula prepared but not yet in
homebrew-core). Treat Mighty as ready to play with, not yet ready for production. See the FAQ for the full status breakdown.
Learn the language¶
- Getting started — install, scaffold a
package, run
mty check, run your first agent, run your first test. - Tour of Mighty — work through the 15 tour
chapters one at a time. Every chapter has a
Try it:block that runs the corresponding canonical example. - Language specification v1.0-RC5 — the normative reference.
- Spec amendments register (A1..A109) — the per-decision archive that the consolidated RC5 spec is built on.
- Conformance coverage — what the conformance corpus exercises (88% of FROZEN surface as of v0.10).
Use the tools¶
- Reference
mty— overview of all subcommands.- Manifest format — the
mighty.tomlschema. - Diagnostic codes — the
MTxxxxregistry. Runmty explain MTxxxxfor inline help (also accepts the legacySDxxxxspelling per amendment A107). - Registry — package index format.
- Stdlib reference — fs, http, json, test, time, tls.
- WebAssembly Interface Types — generated WIT artefacts for the component targets.
Demos and benchmarks¶
- Demos index — runnable end-to-end programs.
- Benchmarks — methodology + numbers for parse throughput, mailbox throughput, agent-send latency, HTTP throughput, native compile time, and Wasm size.
Hack on the compiler¶
- Internals — pipeline overview and per-crate notes. Notable pages: architecture, parser, typeck, borrowck, effects, macros, runtime, scheduler, supervisors, self-hosting.
- Contributing — workflow, tests, style.
- FAQ
- Upstream issues — bugs filed against Cranelift / wasmtime / etc. that affect Mighty.
Status snapshot (v0.49)¶
| Component | State |
|---|---|
| Lexer, parser, CST | shipped |
| Typed AST + HIR + lowering | shipped |
| Diagnostics engine | shipped |
| Formatter (per-node + decls) | shipped (v0.45 fn/struct/enum/type decls) |
| Type checker | shipped |
| Borrow / move / affine checker | shipped |
| Effect / capability checker | shipped |
| Codegen (Cranelift) native | shipped; v0.48 struct field-assignment + Vec-of-aggregate; v0.49 native std.crypto/std.encoding + interp fall-back for not-yet-native stdlib |
| Codegen (Wasm) P2 + cabi_realloc | shipped (v0.18) |
| Codegen (LLVM) | opt-in backend |
| Runtime (scheduler, mailboxes) | shipped |
| Supervisors + budgets + sandboxes | shipped |
| Macros (decl + sandboxed proc) | shipped |
| LSP + DAP | shipped (LSP v0.5+, DAP v0.32 Track A) |
mty pkg (resolve / fetch / publish) |
shipped |
Hot reload (mty reload) |
shipped (v0.17/18) |
Replay (mty replay --byte-identical) |
shipped (v0.17/18) |
| Cluster (distributed agents) | shipped (v0.18 Tier 4.1) |
| LLM-agent stack (std.llm/mcp/memory/swarm) | shipped (v0.26–v0.30) |
Extern C + [[extern_lib]] |
shipped (v0.36 T2; v0.46 truthful linker-failure vs missing-linker diagnostics) |
| String position/range ops + MT5080 | shipped (v0.36 T3) |
| Stardust→Mighty rebrand compat | shipped (v0.36 T4 — STARDUST_* env legacy) |
| PGO release binaries | shipped (v0.36 T5 — Linux + macOS-x86_64 + Win) |
mty find / mty fix / mty hooks |
shipped (v0.33/v0.34/v0.35) |
| Self-host (lexer..min-typeck) | 40/40 tests passing |
Current work (post-v0.49) extends the native Cranelift backend:
native codegen for std.url / std.uuid / std.regex / crypto AEAD
(today they transparently fall back to the interpreter), and native
String methods.
See
CHANGELOG.md
at the repo root (and the per-release notes under
dev/history/releases/)
for the full release history.