9 releases (4 breaking)
Uses new Rust 2024
| 0.6.0 | Jul 3, 2026 |
|---|---|
| 0.5.0 | Jul 2, 2026 |
| 0.3.0 | Jun 3, 2026 |
| 0.2.0 | May 17, 2026 |
| 0.1.2 | Apr 30, 2026 |
#425 in Programming languages
2.5MB
65K
SLoC
Muga
"Muga(無我)" is a Japanese term meaning "selflessness" or "transcendence of self," referring to a state of being beyond personal limitations or free from self-centered thinking.
This programming language incorporates the concept of muga, featuring a simple and intuitive syntax designed to immerse developers in coding while letting go of self-consciousness.
Muga emphasizes both code aesthetics and efficiency, providing an environment where developers can freely express their creative ideas.
Install
Install the published command:
cargo install muga
Install this checkout:
cargo install --path . --locked
Run from the checkout without installing:
cargo run --locked -- --version
cargo run --locked -- samples/println_sum.muga
Quickstart
Create and run a small app:
muga new --template app hello-muga
muga run hello-muga/src/main/main.muga
muga check hello-muga/src/main/main.muga
The generated project contains a muga.toml manifest and source files under
src/. Try the available starters with:
muga new --list-templates
A Small Program
fn sum_to(n: Int) {
mut i = 0
mut acc = 0
while i < n {
acc = acc + i
i = i + 1
}
acc
}
fn main(): Int {
println(sum_to(5))
}
Run it with:
muga run samples/println_sum.muga
Common Commands
muga --help
muga doctor
muga explain E001
muga syntax --format json path/to/file.muga
muga check path/to/file.muga
muga run path/to/file.muga -- arg1 arg2
muga test path/to/file.muga
muga fmt path/to/file.muga
muga doc path/to/package/main.muga
muga build path/to/package/main.muga
Many commands also support --format json for editor and tooling workflows.
Language Snapshot
- Bindings are immutable by default; use
mutfor mutation. - There is no
let. - Type inference is local-first; write annotations where inference would be ambiguous.
- Data is modeled with nominal
recordandenumdeclarations. Option[T]andResult[T, E]are explicit, withmatchand prefixtry expr.- Structured task groups use
group { ... }scopes,spawn expr, andstd::taskjoins; child tasks never outlive their group. - Packages use
package,import,pub, and manifest files. - Package artifact files use
.mgi,.mgc, and.mgb.
For the compact language overview, start with spec-v1.md. Detailed topic specs live in spec/.
Repository Map
- samples/: runnable Muga programs and package examples.
- examples/valid/: small accepted examples.
- examples/invalid/: examples that should be rejected.
- conformance/: conformance fixtures and release checks.
- errors.md: diagnostic catalog.
- ROADMAP.md: current implementation direction.
- RELEASING.md: release process notes.
Development
Run the test suite:
cargo test --locked
Run the local release-quality gate:
scripts/v1-release-gate.sh
Run benchmark health checks:
scripts/benchmark-health-check.sh