moonbit-language
Installation
SKILL.md
MoonBit language
Verification contract
Executable claims in this skill are checked against moonc v0.10.6+80dc50f24 (MoonBit release 0.10.6, build 2026-08-04) on Linux x86_64. The repository runs every mbt check fence on wasm-gc, wasm, js, and native and runs diagnostic fixtures against the same pin. Facts that depend on an external runtime or were not executed are explicitly labeled Documented, not executed with an official source. Blocks marked mbt nocheck are explanatory rejected or deprecated forms; they are not executed.
MoonBit is pre-1.0 and changes quickly. Before relying on a load-bearing claim, run moon version --all. If local moonc differs from the pin:
- Treat the claim as a hypothesis.
- Reproduce the smallest relevant example with
moon check,moon test, ornode scripts/verify_snippet.ts. - Compare the local version with the official latest manifest and current documentation commit; a newer official pin means this skill is stale even when no website release article exists.
- State which version was actually tested and any remaining difference.
Work by task
- Understand code: identify unfamiliar syntax and the local compiler version; search this file for the exact token or diagnostic; load the routed reference; explain behavior only after matching the code to a checked example or an explicitly documented fact.
- Write code: load the smallest relevant reference, use its current forms, then run
moon checkand the narrowest usefulmoon test. Do not invent syntax from another language or an old MoonBit tutorial. - Fix code: preserve the program's intent, reproduce the diagnostic, search both the diagnostic text and suspicious token in the references, apply the current migration, and rerun with warnings denied when deprecation is involved. Do not silence a warning before proving the replacement.
- Judge a feature: distinguish verified, documented, proposal, and unknown. Official docs can lag or suppress warnings; the compiler at the stated pin decides executable behavior.