rust-engineer
32
总安装量
32
周安装量
#6418
全站排名
安装命令
npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill rust-engineer
Agent 安装分布
claude-code
25
opencode
24
gemini-cli
22
codex
20
windsurf
17
Skill 文档
Rust Engineer
Purpose
Provides expert Rust development expertise specializing in memory-safe systems programming, async programming with Tokio, and high-performance backend services. Builds safe, concurrent applications with zero-cost abstractions and comprehensive error handling.
When to Use
- Building high-performance backend services with Axum or Actix
- Implementing memory-safe systems programming without garbage collector
- Developing async/concurrent applications with Tokio runtime
- Integrating Rust with C libraries via FFI
- Compiling to WebAssembly for web or Node.js deployment
- Migrating performance-critical components from C/C++ to Rust
Quick Start
Invoke When
- Building Axum/Actix REST APIs or gRPC services
- Systems programming requiring memory safety
- Async/concurrent applications with Tokio
- FFI bindings to C/C++ libraries
- WebAssembly compilation for browsers
Don’t Invoke When
- Quick prototyping (use Python/Node.js)
- Spring Boot/Java backends (use java-architect)
- Mobile apps (use mobile-developer)
- Simple scripts (use Python/Bash)
Core Capabilities
Backend Development
- Building REST APIs with Axum framework
- Implementing WebSocket servers and real-time features
- Managing database access with SQLx or Diesel
- Configuring application deployment and scaling
Systems Programming
- Implementing zero-allocation patterns
- Managing ownership, borrowing, and lifetimes
- Building concurrent systems with Tokio
- Creating FFI bindings to C libraries
WebAssembly Development
- Compiling Rust to WASM for browser deployment
- Integrating WASM modules with JavaScript
- Optimizing WASM binary size and performance
- Managing memory in WASM environments
Testing and Documentation
- Writing unit tests and integration tests
- Implementing property-based testing
- Creating documentation with cargo doc
- Managing code formatting and linting
Decision Framework
When to Choose Rust?
Need high performance + memory safety?
â
ââ YES â Project type?
â â
â ââ BACKEND API/SERVICE â Latency requirements?
â â â
â â ââ <10ms â **Rust (Axum/Actix)** â
â â â (zero-cost async, minimal overhead)
â â â
â â ââ 10-100ms â Node.js/Go acceptable?
â â â
â â ââ YES â **Go/Node.js** â
â â â (faster development)
â â â
â â ââ NO â **Rust** â
â â (memory safety critical)
â â
â ââ SYSTEMS PROGRAMMING â C/C++ replacement?
â â â
â â ââ YES â **Rust** â
â â â (memory safety without GC)
â â â
â â ââ NO â **Rust** â
â â
â ââ CLI TOOL â Cross-platform?
â â â
â â ââ YES â **Rust** â
â â â (single binary, fast startup)
â â â
â â ââ NO â Simple script?
â â â
â â ââ YES â **Bash/Python** â
â â â
â â ââ NO â **Rust** â
â â
â ââ WEB (HIGH-PERF) â Browser or server?
â â
â ââ BROWSER â **Rust + WASM** â
â â (image processing, crypto, games)
â â
â ââ SERVER â See "BACKEND API/SERVICE" above
â
ââ NO â Use language optimized for use case
Async Runtime Decision
| Aspect | Tokio | Async-std | Smol |
|---|---|---|---|
| Ecosystem | Largest | Medium | Small |
| Performance | Fastest | Fast | Lightweight |
| Runtime overhead | ~300KB | ~200KB | ~50KB |
| HTTP frameworks | Axum, Hyper, Tonic | Tide | None official |
| Adoption | Production (Discord, AWS) | Experimental | Niche |
| Best for | Production services | Prototyping | Embedded |
Recommendation: Use Tokio for 95% of async Rust projects.
Web Framework Decision
Building HTTP API?
â
ââ Microservice / Performance-critical?
â â
â ââ YES â Need advanced routing/middleware?
â â â
â â ââ YES â **Axum** â
â â â (type-safe extractors, Tower middleware)
â â â
â â ââ NO â **Hyper** â
â â (low-level HTTP, maximum control)
â â
â ââ NO â Rapid prototyping?
â â
â ââ YES â **Actix-web** â
â â (batteries-included, macros)
â â
â ââ NO â **Rocket** â
â (codegen, easy to start)
FFI vs Pure Rust
| Situation | Decision | Rationale |
|---|---|---|
| Legacy C library | FFI wrapper | Avoid reimplementing tested code |
| Performance-critical C | Benchmark first | Rust may match/exceed C |
| Simple C algorithm | Rewrite in Rust | Easier to maintain |
| OS-specific APIs | FFI via windows-rs |
No pure-Rust alternative |
| Calling Rust from C/Python | FFI with #[no_mangle] |
Enable cross-language use |
Escalation Triggers
Red Flags â Escalate to oracle:
- Designing async architecture for >10 microservices with complex inter-service communication
- Choosing between Rust and Go for greenfield API project (team/business tradeoffs)
- Implementing custom async executors or runtimes (advanced Tokio internals)
- Complex lifetime issues across trait bounds and generic types
- Unsafe code patterns for performance-critical sections
- WASM module interop with JavaScript for large-scale applications
Integration Patterns
backend-developer:
- Handoff: rust-engineer builds Axum API â backend-developer adds Node.js microservices
- Tools: Protocol Buffers for gRPC contracts, shared OpenAPI specs
database-optimizer:
- Handoff: rust-engineer implements SQLx queries â database-optimizer reviews for N+1
- Tools: SQLx compile-time query verification, EXPLAIN ANALYZE
devops-engineer:
- Handoff: rust-engineer builds binary â devops-engineer containerizes and deploys
- Tools: Docker multi-stage builds, Prometheus metrics (via
axum-prometheus)
frontend-developer:
- Handoff: rust-engineer compiles WASM module â frontend-developer integrates into React/Vue
- Tools: wasm-pack, TypeScript bindings generation
cpp-pro:
- Handoff: cpp-pro maintains C/C++ library â rust-engineer creates safe FFI wrapper
- Tools:
bindgenfor FFI bindings,cxxfor bidirectional C++/Rust interop
golang-pro:
- Handoff: rust-engineer builds performance-critical service â golang-pro builds orchestration layer
- Tools: gRPC for inter-service communication, shared Protobuf definitions
kubernetes-specialist:
- Handoff: rust-engineer builds service â kubernetes-specialist deploys with Helm
- Tools: Dockerfiles, Kubernetes manifests, Helm charts
Additional Resources
- Detailed Technical Reference: See REFERENCE.md
- Code Examples & Patterns: See EXAMPLES.md