More Amplifier Stories
Amplifier Bundle

Rust Dev Bundle

Experimental

cargo fmt, clippy, cargo check, and deep LSP analysis — in one composable package.

Built by samschillace in an Amplifier session · February 2026

The Problem

LSP navigation without
quality tooling.

Rust developers had semantic code intelligence — but the rest of the Rust workflow was stuck outside the agent.

🔍

Navigate, but not verify

Go-to-definition worked, but no way to run cargo fmt, clippy, or cargo check through the agent.

🔇

Silent failures

Edit a file, introduce a type error — no feedback until you leave the agent and run cargo check yourself.

📋

Grep-level analysis

Understanding architecture meant text search. No trait tracing, no call hierarchies, no semantic depth.

The Solution

Three composable behaviors.
Use what you need.

rust-lsp

Persistent rust-analyzer with warm server, custom extensions, and all 14 LSP operations.

hover goToDefinition findReferences incomingCalls

rust-quality

rust_check tool + auto-check hook. Every .rs edit triggers quality analysis automatically.

cargo fmt clippy cargo check stub detect

rust-dev

Composite bundle — includes both. Plus two expert agents: rust-dev and code-intel.

rust-dev agent code-intel agent
rust-lsp
+
rust-quality
=
rust-dev
rust_check Tool

Single-command quality gate.

One call. Four checks. Structured output with file, line, code, message, and severity.

// Check a file
rust_check({ "paths": ["src/main.rs"] })

// Check entire project
rust_check({ "paths": ["."] })

// Run specific checks only
rust_check({ "paths": ["src/"], "checks": ["lint", "types"] })

What it runs

🎨 cargo fmt Formatting
📎 clippy Linting
⚙️ cargo check Type / Compile
🔎 Stub detection Completeness

Stub detection

Catches incomplete code before it ships:

todo!()          // caught
unimplemented!() // caught
unreachable!()   // caught
// TODO           // caught
// FIXME          // caught

// Smart exemptions:
unreachable!() in match arms → OK
todo!() in test files     → OK
Validation
265

files across 5 Cargo workspaces.

Zero false positives. Tested against real-world Rust codebases — not synthetic examples.

code-intel Agent

Deep architecture analysis.
Not just "find definition."

The code-intel agent uses LSP to trace the shape of a codebase — traits, implementations, call hierarchies, and design patterns.

Without code-intel

  • grep for function names
  • Manually open files to trace calls
  • Miss trait implementations
  • Guess at architecture from file names
  • 30+ minutes of human code reading

With code-intel

  • Map all trait impls via goToImplementation
  • Trace 35 callers via incomingCalls
  • Find 5 ProviderAdapter implementations
  • Identify BoxFuture patterns over async-trait
  • Full architectural map in one pass
// Real output: unified-llm-rust analysis
4 architectural layers mapped
  ├─ Core traits: Provider, ModelProvider, StreamingProvider
  ├─ Adapter layer: 5 ProviderAdapter implementations
  ├─ Streaming model: chunked response → Stream<Item=Result<Chunk>>
  └─ Entry point: generate()35 callers traced

Design pattern detected:
  Explicit BoxFuture return types over #[async_trait]
  → Better control over Send bounds and performance
Auto-Check Hook

Every .rs edit triggers
automatic quality checks.

Write or edit a Rust file — the hook fires cargo fmt, clippy, and cargo check in the background. Results appear inline with severity-adaptive display.

How it works

write_file / edit_file
*.rs detected
rust_check runs

Severity-adaptive display:

  • Errors — prominent, always shown
  • Warnings — subtle, collapsed by default
  • Clean — minimal success indicator

Progress tracking

Edit 1: 3 errors, 2 warnings
  E0308: mismatched types
  E0599: no method named `foo`
  E0425: cannot find value `bar`

Edit 2: 2 warnings (errors fixed ✓)
  clippy::unused_variable

Edit 3: ✓ Clean
Persistent rust-analyzer

Warm server. Instant responses.

The rust-analyzer server stays alive for 5 minutes between calls. First call starts the proxy — every call after that is instant.

First Call

~3s

Server startup + workspace indexing

Subsequent Calls

instant

Server already warm, cached analysis

// Server lifecycle
Call 1start_proxy()rust-analyzer boots  →  response
Call 2proxy aliveinstant              →  response
Call 3proxy aliveinstant              →  response
  ...
5minidle timeoutserver shutdownclean exit
Custom Extensions

Beyond standard LSP.

Three rust-analyzer specific extensions — available via the customRequest operation.

expandMacro

See what derive(Debug) or vec![] actually expand to. Invaluable for debugging proc macros.

relatedTests

Find all test functions that exercise a given function or module. Trace test coverage without running anything.

externalDocs

Get docs.rs links for any symbol. Jump from code to documentation in one operation.

⚠ Note: Custom extensions work with standalone rust-analyzer builds. The rustup component build has limited extension support — this is a known upstream limitation, clearly documented in the bundle.

Full LSP Coverage

14 operations. All verified.

Every LSP operation tested against real Rust codebases and confirmed working.

Navigation

hover goToDefinition findReferences goToImplementation documentSymbol workspaceSymbol

Call Hierarchy

prepareCallHierarchy incomingCalls outgoingCalls

Verification

diagnostics

Refactoring

rename codeAction inlayHints

Extensions

customRequest
Real-World Validation

Tested on production codebases.

attractor-rust

3
crates
67
files

Full architectural map produced. All trait hierarchies traced, module boundaries identified, public API surface documented.

unified-llm-rust

4
layers mapped
35
callers traced

Streaming model documented, 5 ProviderAdapter implementations found, design patterns identified automatically.

✓ All 14 LSP operations verified working

hover · goToDefinition · findReferences · diagnostics · incomingCalls · outgoingCalls · documentSymbol · inlayHints · goToImplementation · rename · codeAction · workspaceSymbol · prepareCallHierarchy · customRequest

By the Numbers

Development velocity.

~53
Bundle Tests
14
LSP Operations
3
Behaviors
2
Expert Agents
265
Files Validated
5
Cargo Workspaces
421
LSP Module Tests
0
False Positives
Sources & Methodology

How we verified these numbers.

Every claim in this deck traces back to source code, test results, or direct observation in Amplifier sessions.

Repository

  • microsoft/amplifier-bundle-rust-dev
  • Status: Experimental (not yet in public cache)
  • Primary contributor: samschillace (sole author)
  • Built entirely in Amplifier sessions

Test Counts

  • ~53 tests specific to rust-dev bundle
  • 421 test functions across the LSP module
  • 265 .rs files validated across 5 Cargo workspaces
  • Zero false positives confirmed

LSP Operations (14)

  • goToDefinition, findReferences, hover
  • documentSymbol, workspaceSymbol, goToImplementation
  • prepareCallHierarchy, incomingCalls, outgoingCalls
  • diagnostics, rename, codeAction, inlayHints
  • customRequest (expandMacro, relatedTests, externalDocs)

Methodology

  • All operations tested against real Rust codebases
  • Validation run on attractor-rust and unified-llm-rust
  • No round-number inflation; "~53" qualifier used where exact count may vary with test additions
  • Architecture analysis outputs verified by human review

Data as of: February 20, 2026

Get Started

Try it today.

Add the bundle. Write Rust. Get instant feedback.

# Full experience (LSP + quality + agents)
amplifier bundle use git+https://github.com/microsoft/amplifier-bundle-rust-dev@main#subdirectory=behaviors/rust-dev.yaml --app

# Just LSP (rust-analyzer navigation, no quality hooks)
amplifier bundle use git+https://github.com/microsoft/amplifier-bundle-rust-dev@main#subdirectory=behaviors/rust-lsp.yaml --app

# Just quality checks (cargo fmt/clippy/check, no LSP)
amplifier bundle use git+https://github.com/microsoft/amplifier-bundle-rust-dev@main#subdirectory=behaviors/rust-quality.yaml --app
github.com/microsoft/amplifier-bundle-rust-dev
← More Amplifier Stories
More Amplifier Stories