
Modula-9
A safety-checked language for machine-written, human-audited code
Gallery
About Modula-9
Modula-9, also called M9, is an open-source programming language designed for code that may be written quickly by an AI agent but still has to be understood and defended by a person. It belongs to the Wirth language family and draws on the Modula-2 and Oberon tradition of explicit, readable structure. The project describes its target style as code that is written quickly and audited slowly, especially in data science, finance, and research infrastructure. Its goal isn't to make generated code look clever or compact. It is to make important behavior visible enough that a reviewer can follow what the program says and where it may fail.
The language builds several checks into its semantics rather than leaving them as optional compiler settings. Range, overflow, and conversion checking can't be disabled. Exceptions that a procedure can raise appear in its signature, so a reviewer doesn't need to infer all failure paths from the implementation alone. Borrowing is also explicit. If a procedure keeps a borrowed parameter beyond the immediate call, that retention must be declared in the signature and is checked. Together, these rules are intended to reject unsafe ambiguity early and leave a more honest interface for both the next agent and the human who signs off on the work.
Those constraints address a real review problem with machine-generated code. An agent can produce a large, plausible implementation faster than a person can build confidence in it, and familiar syntax alone doesn't make hidden numeric or lifetime assumptions easier to find. M9's answer is to put more evidence at procedure boundaries and to make some dangerous behaviors nonoptional. It doesn't prove that a program's business logic is correct, and it doesn't replace tests or a careful reviewer. It aims to reduce the number of silent choices a reviewer must reconstruct after the code has already been produced.
M9 comes with a self-hosted compiler named m9c, which means the compiler itself is written in the language it compiles. It emits C11 rather than requiring a custom machine-code backend. The repository includes bootstrap C, so building from source needs a C compiler but doesn't require a previous M9 installation or another language toolchain. This approach gives the project a practical route onto existing systems while keeping the implementation available for inspection. It also makes generated C part of the deployment story, though teams will still need to decide how that output fits their build, debugging, and platform support practices.
The distribution is broader than a bare compiler. It includes a runtime, a standard library supplied as source, generated module documentation, a language server, a formatter, and a manual page. The language server and formatter are themselves written in M9. An interactive tutorial, also written in M9, offers a lower-friction way to learn the syntax and safety model. The project publishes prebuilt packages through GitHub releases and records the distribution, compiler, and smoke test used for each build. Those build receipts are a thoughtful fit for a language that emphasizes auditability and reproducible evidence.
Modula-9 is most relevant to teams experimenting with agent-written infrastructure where the cost of review matters more than access to the largest package ecosystem. A research group could use it for data processing components whose numeric behavior should fail visibly. Finance developers may value mandatory overflow and conversion checks. Teams evaluating AI coding agents can use its explicit signatures as a constraint that forces generated code to state more of its assumptions. It is less compelling for projects that depend heavily on mature third-party libraries, mainstream hiring pools, or existing framework integrations, since the language and community are still very new.
The compiler and related tools are licensed under GPL-3.0-or-later, and there is no commercial plan to buy, so the right pricing classification is open source. The available package record identifies version 0.4.1 and shows an intent to package it for Debian, while the public repository includes the source and releases today. That maturity level should shape expectations. M9 already has a compiler, library, editor tooling, tutorial, and release artifacts, but it doesn't yet have the ecosystem or track record of Rust, C, or established Wirth-family languages. For developers willing to evaluate a young tool, its value lies in a coherent idea. Code generated at machine speed should expose enough safety and intent for a human to audit it responsibly.
Key Features
- Mandatory numeric safety checks
- Exceptions declared in signatures
- Checked borrowed parameter retention
- Self-hosted C11 compiler
- Language server and formatter
- Interactive M9 tutorial
Pros & Cons
What we like
- Makes generated code deliberately explicit for review
- Builds with an ordinary C compiler
- Ships more than a bare compiler
- Publishes build receipts with release packages
Room for improvement
- Very young language with a tiny community
- Third-party library selection is still limited
- Debian packaging is proposed rather than complete
- Generated C adds another debugging layer
Frequently Asked Questions
What is Modula-9?
What safety checks does M9 enforce?
What is included with the compiler?
Is Modula-9 free?
Best For
Featured in
Alternatives to Modula-9
View allKevin Gabeci
Solo developer building web apps, cozy browser games, and AI creator toolkits.

SoloDevStack
A solo developer blog built on head-to-head tool comparisons, 580+ posts deep.

Codedex
A gamified, story-driven platform that teaches Python, web dev, and more like an RPG quest
Vibe Built
Building real apps with agentic AI. What worked, what broke, what shipped.
Our take
Tool Index Editorial · Oct 2026· 4.0/5
Modula-9 is a young open-source language built to make generated systems code easier for a person to audit. Its fixed-width types, mandatory checks, explicit conversions, declared failures, and checked borrowing put useful evidence at procedure boundaries. We found more substance than a language manifesto here, including a self-hosted compiler that emits C11, a browser tutorial, editor tooling, packages, and published build checks.
The compiler is free under the GPL, with an exception that permits proprietary programs built with its runtime. The catch is maturity. The ecosystem is tiny, macOS and Windows support are experimental, and generated C adds another debugging layer. It is a thoughtful option for research or tightly scoped infrastructure, but not yet a low-risk replacement for an established systems language.
Editorial opinion from the Tool Index team, written from the public product pages. Not a user review.
Reviews (0)
Badge builder
Add Modula-9 to your website
Choose a badge style and size, preview it here, then copy the generated HTML. Badge images are self-contained SVGs and do not require an external script.
<a href="https://toolindex.net/tools/modula-9?ref=badge" target="_blank" rel="noopener">
<img src="https://toolindex.net/badge/modula-9/medium.svg" alt="Modula-9 - Listed on Tool Index" width="180" height="50" />
</a> How to use the badge
- 1. Pick the style, size, and theme that fit your layout.
- 2. Copy the generated HTML from the code block.
- 3. Paste it into your footer, homepage, or press page.
Standard badge available
The standard listing badge is available now. Score and circle badges are limited to tools currently ranked in the top 10 of a category.
Badge clicks return visitors to this profile with a referral tag so the source remains identifiable.
Related Tools
Kevin Gabeci
Solo developer building web apps, cozy browser games, and AI creator toolkits.

Coolify
Self-hostable, open source alternative to Heroku and Netlify

Warp
The modern terminal reimagined with AI and collaboration

Bolt.new
Prompt-to-deployed full-stack app inside the browser
Work on Modula-9? Request listing access or correction