Rust Skill
SkillDev toolsHermetic Rust crate building, testing, and formatting via Bazel targets. Covers build/test commands through rules_rust, formatting with bazel run //tools:format, test suites defined in root BUILD, and dependency management via MODULE.bazel crates.io integration.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Rust Skill skill
What this skill tells your AI
The instructions your AI receives, as published by moosync/moosync in .agents/skills/rust/SKILL.md and read by ahel’s review.
Description
The Rust skill provides a set of reusable commands for building, testing, and formatting Rust crates in the Moosync repository. All operations use Bazel's hermetic rules_rust toolchain — Cargo is never invoked directly.
Commands
| Command | Description | Example |
|---|---|---|
| Build crate | Build a specific Rust library or binary target via Bazel. | bazel build //core/player:player |
| Run tests | Execute unit tests for a crate through Bazel. | bazel test //core/database:database_test |
| Format files | Run hermetic formatter on staged .rs, .slint, .proto, and Bazel files via the pre-commit target. | bazel run //tools:format -- path/to/file.rs path/to/file.proto |
Usage Patterns
- Quick build of a feature module — identify the target label in the crate's
BUILD.bazelfile and run the Build crate command. - Test after change — run Run tests to catch regressions before committing. Test suites are aggregated under
core_testsat the root level. - Formatting — invoke Format files as part of a Git pre-commit hook (see
.git/hooks/pre-commit). The formatter resolves hermetic rustfmt, slint-lsp, buildifier, and buf through Bazel runfiles.
Example Workflow
# Build the player module
bazel build //core/player:player
# Run tests for the database crate
bazel test //core/database:database_test
# Format specific files (pre-commit hook pattern)
bazel run //tools:format -- core/player/src/lib.rs ui/slint/app.slint
Rules_rust Integration Notes
- All Rust dependencies are declared in
modules/crates.MODULE.bazelvia thecrates.iointegration. Do not manually edit lockfiles. - New crates should use
rust_library,rust_binary, orrust_shared_libraryfrom@rules_rust//rust:defs.bzl. - Build scripts (build.rs) are declared with
cargo_build_script()from@rules_rust//cargo:cargo_build_script.bzl.
Signals
- GitHub stars
- 257
- Forks
- 13
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
rust-moosync- Source
- github.com/moosync/moosync