Skip to content

Mighty Language Specification v0.1

The full specification is maintained outside the repository at mighty_language_spec_v0_1.md. A copy lives in the project owner's working tree; it will be vendored into this directory in a later slice.

§1 Naming

Originally named Stardust (with CLI binary sdust and source extension .sd). Rebranded to Mighty (with CLI binary mty and source extension .mty) in v0.7. The GitHub repository was renamed to hassard0/Mighty to match. Edition "2026" is a calendar version, not a brand, and stays unchanged.

Scope of v0.1

The v0.1 specification covers:

  • lexical structure (encoding, comments, identifiers, literals);
  • program and module structure;
  • the type system, including primitives, structs, enums, generics, and the T!E result sugar;
  • ownership, borrowing, affine types, destructors, arenas, and the managed agent-local heap;
  • capabilities and effects;
  • functions, control flow, agents, protocols, supervisors, tasks, budgets, and sandboxes;
  • error handling and panic policy per profile (host, web, edge, core);
  • traits and dynamic dispatch;
  • compile-time metaprogramming (constants, const fn, hygienic macros);
  • unsafe code;
  • frontend (DOM, JS interop) and backend (HTTP, agents) models;
  • the compilation pipeline (HIR, AIR, MtyIR);
  • runtime architecture;
  • C, C++, JavaScript, Python, and data interop;
  • the standard library v0.1 surface;
  • token-efficiency rules and canonical short forms;
  • toolchain, build modes, and compiler flags;
  • the MVP boundary;
  • the construction plan (phases 0–8);
  • the conformance suite outline.

Quick map to docs

If you want to read about a specific feature with worked examples rather than the normative text, the tour covers most of the spec sections:

Spec section Tour chapter
§4 Program structure 01 — Hello, Mighty
§6 Types 02 — Types
§18 Generics 03 — Generics
§6.3, §17 Errors 04 — Errors
§11 Control flow 05 — Control flow
§12, §13 Agents and protocols 06 — Agents
§12.4 Send and ask 07 — Send, ask, deadlines
§15 Supervisors 08 — Supervisors
§7.5 Arenas 09 — Arenas
§8 Capabilities 10 — Capabilities
§16 Budgets and sandboxes 11 — Budgets
§26 Interop 12 — Extern
§21 Unsafe 13 — Unsafe

Slice 1 divergences

The slice 1 parser implements a subset of the v0.1 surface syntax. Two example files note where their source diverges from the spec for slice 1 compatibility — see examples/19_backend_service.mty and examples/20_frontend_component.mty. The full list is in SLICE1.md.