moon v1.37 - Rust WASM toolchain and MCP support
In this release, we're stoked to release another WASM toolchain plugin, and experimental MCP/AI support!
RFC: Task input additions and enhancements
We're planning to improve task inputs and have written up an RFC to discuss these changes. We'd appreciate any and all feedback!
New Rust toolchain powered by WASM
With toolchain plugins entering beta last release, it's only natural that we start
migrating the legacy toolchains into plugins. And with this release, the next one we've migrated is
the Rust toolchain! However, unlike the TypeScript toolchain, the new Rust toolchain is opt-in and
must be enabled. Simply rename rust
to unstable_rust
in .moon/toolchain.yml
.
unstable_rust:
version: '1.87.0'
components: ['clippy', 'rustfmt']
targets: ['wasm32-wasip1']
syncToolchainConfig: true
New functionality
Although the new Rust toolchain is a one-to-one port, the WASM APIs provide far more flexibility and functionality than before. For example, the follow improvements and enhancements have been made:
- The Cargo workspace can now exist at any folder depth and does not need to exist at the moon workspace root. Additionally, because of this, we can now support multiple Cargo workspaces in the same moon workspace.
- Added a new
addMsrvConstraint
setting, which will sync the version as a constraint toCargo.toml
under theworkspace.package.rust-version
orpackage.rust-version
fields. - Improved the accuracy of implicit project dependencies (inferred from
Cargo.toml
). - Improved the parsing of manifest (
Cargo.toml
) and lock (Cargo.lock
) files. This information is then fed into the task hashing process. - Improved the Docker prune implementation by preserving all binaries (inferred from
cargo metadata
) while deleting thetarget
directory. - Any
cargo
orrustup
commands are now hashed and cached, and will only re-run when parameters change. Unlike the current toolchain, which always runs these commands.
Quite a list of improvements, and this doesn't even include all the WASM / plugin improvements that have been slowly introduced! Give this new toolchain a try, and let us know what you think!
MCP editor integration
AI is all the rage these days, and even more so lately with the introduction of MCP (model context protocol) and agentic workflows. MCP is a new way for AI assistants to "understand" what's going on in your project without you having to explain everything. It works by feeding structured information, like in the context of moon, projects, tasks, and relationships, directly into AI models like GitHub Copilot or Cursor.
No more tedious explanations required! The AI can jump straight to helpful suggestions that actually work in your codebase, saving you time, and making the whole experience much smoother, especially in complex monorepos with lots of moving parts.
To support agentic workflows, we're introducing an experimental moon mcp
command, that starts an MCP server, and can be integrated into your editor. For
example, VS Code:
{
"servers": {
"moon": {
"type": "stdio",
"command": "moon",
"args": ["mcp"],
"env": {
"MOON_WORKSPACE_ROOT": "${workspaceFolder}"
}
}
}
}
Supported tools
Our MCP server currently supports the following tools. We'll be adding more tools in the future, so if you have any suggestions, please let us know!
get_project
- Get a project and its tasks byid
.get_projects
- Get all projects.get_task
- Get a task bytarget
.get_tasks
- Get all tasks.
Other changes
View the official release for a full list of changes.
- Added
environment.initializing
andenvironment.initialized
webhook events. - Added
root
andtoolchain
fields todependencies.installing
anddependencies.installed
webhook events. - Updated proto to v0.49.4 (from 0.49.1).
What's next?
With toolchains plugins being stabilized more, we'd like to focus on some other areas.
- Better command line argument parsing/joining (especially for task
args
) - Better child process I/O piping
- Terminal notifications
- WASM toolchain documentation
Looking for toolchain contributors!
Now that the Rust toolchain has been ported to WASM, we'd like to start porting the other toolchains, starting with Go and JavaScript (not Bun or Node.js), and also investigate supporting toolchains for entirely new languages, like PHP and Ruby! If you're interested in contributing these toolchains, please ping us in Discord!
The only requirements is that these toolchains must be written in Rust and must exist in the moonrepo/plugins repository!