MoonForge 是一个面向 MoonBit 项目与通用本地工程的声明式增量任务编排工具,定位于填补 MoonBit 生态中轻量构建工具与工程自动化基础设施的空白。项目采用 Moonforge.toml 作为配置入口,支持任务依赖描述、输入输出声明、变更检测、增量跳过、失败阻断和执行原因解释,适用于文档生成、代码生成、资源处理、本地 CI 复现等真实开发场景。相比一次性脚本或不可追踪的命令集合,
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
MoonForge
MoonForge is a MoonBit-native incremental task runner for small builds, code generation pipelines, document workflows, asset preparation, and reproducible local CI commands. It makes task dependencies, inputs, outputs, caching, and failure reasons explicit.
Project status
MoonForge is an OSC2026 engineering-infrastructure project. The current release focuses on a dependable native CLI, deterministic dependency planning, incremental execution, diagnostics, and a small configuration format that is easy to review and extend.
Install MoonBit
Use the MoonBit 0.10.3 toolchain for the competition acceptance environment. The official installers are:
Restart the terminal if
moonis not onPATH, then verify the toolchain:The GitHub Actions workflow pins the complete 0.10.3 toolchain revision so that CI and the acceptance environment use the same compiler and formatter.
Quick start
From the repository root:
moon fmtandmoon infodo not accept--deny-warnin the MoonBit 0.10.x CLI.moon fmt --checkis the strict formatting gate;moon check --fmt --deny-warncombines formatting and warning-free compilation;moon inforegenerates the public interfaces and CI verifies that they are stable.For a complete OSC2026-style local check, run:
Configuration
MoonForge reads
Moonforge.toml. Each task is declared under[tasks.NAME]:cmddepsinputsoutputsphonydescExample:
Tasks without declared outputs are treated as effectively phony. The sample configuration in this repository demonstrates documentation, asset, and aggregate build tasks.
CLI
runplans tasks in dependency order, skips up-to-date tasks using input and output fingerprints, and blocks dependent work after a failure.-j Nenables bounded parallel execution within a dependency level.doctorreports cycles, duplicate or overlapping outputs, missing inputs, empty commands, and tasks that cannot be reached from the default target.statssummarizes graph depth, task classes, declared inputs/outputs, and reachability.auditpresents the same review surface as structured severity, code, task, path, and message findings. Every executed run prints cache-hit and duration metrics.Benchmarks
The repository includes reproducible small-chain, medium-mixed, wide-fanout, and deep-chain workloads. Run them with
powershell -ExecutionPolicy Bypass -File scripts\run_benchmarks.ps1 -Jobs 4; see benchmarks/README.md for the data contract.Repository layout
*.mbt: MoonForge library and test implementation.cmd/main: native CLI entry point.Moonforge.toml: runnable sample project configuration.docs/: design, acceptance, release, and competition notes.scripts/verify_acceptance.ps1: reproducible local acceptance gate..github/workflows/ci.yml: pinned cross-platform checks.Development
Please read CONTRIBUTING.md. Pull requests should include tests for behavior changes and should leave these commands clean:
Links and license
MoonForge is released under the Apache License 2.0.