A Claude Code plugin providing comprehensive Rust development support through: rust-analyzer LSP integration for IDE-like features 16 automated hooks for code quality, security, and analysis Cargo tool ecosystem integration
FAQ
rust-lsp is a Claude Code plugin with hand-picked skills for development work, indexed on Flowy. Install it with the command on its page. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Repo: zircote/rust-lsp
A Claude Code plugin providing comprehensive Rust development support through:
# Run the setup command (after installing the plugin)
/setup
Or manually:
# Install rust-analyzer
rustup component add rust-analyzer
# Install nightly toolchain (required for some tools)
rustup toolchain install nightly
# Install all cargo tools
cargo install cargo-audit cargo-deny cargo-outdated cargo-machete \
cargo-semver-checks cargo-geiger cargo-expand cargo-bloat \
cargo-mutants && \
cargo +nightly install cargo-udeps
The plugin configures rust-analyzer for Claude Code via .lsp.json:
{
"rust": {
"command": "rust-analyzer",
"args": [],
"extensionToLanguage": { ".rs": "rust" },
"transport": "stdio"
}
}
Capabilities:
All hooks run afterWrite and are configured in hooks/hooks.json.
| Hook | Trigger | Description |
|---|---|---|
rust-format-on-edit | **/*.rs | Auto-format with rustfmt |
rust-check-on-edit | **/*.rs | Compile check with cargo check |
rust-clippy-on-edit | **/*.rs | Lint with cargo clippy |
rust-test-compile-on-edit | **/*.rs | Verify tests compile (cargo test --no-run) |
| Hook | Trigger | Description |
|---|---|---|
rust-doc-check | **/src/**/*.rs | Check rustdoc for warnings/errors |
rust-todo-fixme | **/*.rs | Surface TODO/FIXME/XXX/HACK comments |
rust-unsafe-detector | **/*.rs | Flag unsafe blocks for review |
| Hook | Trigger | Tool Required | Description |
|---|---|---|---|
rust-audit | **/Cargo.lock | cargo-audit | CVE vulnerability scanning |
rust-deny-check | **/Cargo.toml | cargo-deny | License/security policy enforcement |
rust-outdated | **/Cargo.toml | cargo-outdated | Check for outdated dependencies |
rust-machete | **/Cargo.toml | cargo-machete | Fast unused dependency detection |
rust-unused-deps | **/Cargo.toml | cargo-udeps | Thorough unused dependency check (nightly) |
| Hook | Trigger | Tool Required | Description |
|---|---|---|---|
rust-semver-check | **/src/lib.rs | cargo-semver-checks | API compatibility verification |
rust-geiger | **/Cargo.toml | cargo-geiger | Unsafe code ratio in dependencies |
| Hook | Trigger | Description |
|---|---|---|
rust-mutants-hint | **/src/**/*.rs | Suggests mutation testing when available |
rust-bloat-hint | **/Cargo.toml | Suggests binary size analysis |
rust-expand-hint | **/*.rs | Suggests macro expansion when macros detected |
rust-bench-hint | **/*.rs | Suggests benchmark run when benchmarks detected |
| Hook | Trigger | Description |
|---|---|---|
markdown-lint-on-edit | **/*.md | Lint markdown files |
| Tool | Installation | Purpose |
|---|---|---|
rustfmt | rustup component add rustfmt | Code formatting |
clippy | rustup component add clippy | Linting |
rust-analyzer | rustup component add rust-analyzer | LSP server |
| Tool | Installation | Purpose |
|---|---|---|
cargo-audit | cargo install cargo-audit | Security vulnerability database |
cargo-deny | cargo install cargo-deny | License and security policy |
cargo-outdated | cargo install cargo-outdated | Dependency freshness |
cargo-machete | cargo install cargo-machete | Unused dependencies (fast) |
| Tool | Installation | Purpose |
|---|---|---|
cargo-udeps | cargo +nightly install cargo-udeps | Unused dependencies (thorough) |
cargo-semver-checks | cargo install cargo-semver-checks | Semver compatibility |
cargo-geiger | cargo install cargo-geiger | Unsafe code metrics |
cargo-expand | cargo install cargo-expand | Macro expansion |
cargo-bloat | cargo install cargo-bloat | Binary size analysis |
cargo-mutants | cargo install cargo-mutants | Mutation testing |
/setupInteractive setup wizard for configuring the complete Rust development environment.
What it does:
rustup and cargo installationcargo-udeps.lsp.json is correctUsage:
/setup
Quick install command (from the wizard):
rustup component add rust-analyzer && \
rustup toolchain install nightly && \
cargo install cargo-audit cargo-deny cargo-outdated cargo-machete \
cargo-semver-checks cargo-geiger cargo-expand cargo-bloat \
cargo-mutants && \
cargo +nightly install cargo-udeps
| Command | Description |
|---|---|
/setup | Full interactive setup for LSP and all cargo tools |
If using cargo-deny, initialize configuration:
cargo deny init
This creates deny.toml for configuring:
Edit hooks/hooks.json to:
head -N)Example - disable a hook:
{
"name": "rust-geiger",
"enabled": false,
...
}
rust-lsp/
โโโ .claude/
โ โโโ commands/
โ โโโ setup.md # /setup command
โโโ .claude-plugin/
โ โโโ plugin.json # Plugin metadata
โโโ .lsp.json # rust-analyzer configuration
โโโ hooks/
โ โโโ hooks.json # 16 automated hooks
โโโ CLAUDE.md # Project instructions
โโโ README.md # This file
Cargo.toml exists in project rootcargo check to generate initial build artifactsrust-analyzer --versioncat .lsp.jsonRequires nightly toolchain:
rustup toolchain install nightly
rustup component add rust-src --toolchain nightly
cargo +nightly udeps
Initialize and update:
cargo deny init
cargo deny fetch
cat hooks/hooks.jsoncommand -v cargo-audit)Reduce head -N values in hooks.json for less verbose output.
MIT
.claude-plugin/
plugin.json
.fastembed_cache/
models--Qdrant--all-MiniLM-L6-v2-onnx/
blobs/
56c8c186de9040d4fea8daac2ca110f9d412bf04
56c8c186de9040d4fea8daac2ca110f9d412bf04.lock
61e23f16c75ff9995b1d2f251d720c6146d21338
61e23f16c75ff9995b1d2f251d720c6146d21338.lock
9bbecc17cabbcbd3112c14d6982b51403b264bfa
9bbecc17cabbcbd3112c14d6982b51403b264bfa.lock
bbd7b466f6d58e646fdc2bd5fd67b2f5e93c0b687011bd4548c420f7bd46f0c5
bbd7b466f6d58e646fdc2bd5fd67b2f5e93c0b687011bd4548c420f7bd46f0c5.lock
c17ed520ed8438736732a54957a69306b8822215
c17ed520ed8438736732a54957a69306b8822215.lock
refs/
main
snapshots/
5f1b8cd78bc4fb444dd171e59b18f3a3af89a079/
config.json
model.onnx
special_tokens_map.json
tokenizer_config.json
tokenizer.json
.github/
copilot-instructions.md
dependabot.yml
ISSUE_TEMPLATE/
bug_report.yml
config.yml
feature_request.yml
prompts/
mcp-server.prompt.md
slash-command.prompt.md
PULL_REQUEST_TEMPLATE.md
workflows/
ci.yml
dependabot-automerge.yml
.gitignore
.lsp.json
.markdownlint-cli2.jsonc
Cargo.lock
Cargo.toml
CLAUDE.md
commands/
setup.md
hooks/
hooks.json
LICENSE
README.md
tests/
main.rsยฉ 2026 Flowy ยท Free and open source
Built for Claude Code ยท Not affiliated with Anthropic