๐ŸŽฏ

m11-ecosystem

๐ŸŽฏSkill

from actionbook/rust-skills

VibeIndex|
What it does

Guides Rust developers in selecting, integrating, and managing ecosystem dependencies with best practices and strategic decision-making.

๐Ÿ“ฆ

Part of

actionbook/rust-skills(35 items)

m11-ecosystem

Installation

Quick InstallInstall with npx
npx skills add ZhangHanDong/rust-skills
CargoRun with Cargo (Rust)
cargo install cowork
git cloneClone repository
git clone https://github.com/ZhangHanDong/rust-skills.git
Add MarketplaceAdd marketplace to Claude Code
/plugin marketplace add ZhangHanDong/rust-skills
๐Ÿ“– Extracted from docs: actionbook/rust-skills
15Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

"Use when integrating crates or ecosystem questions. Keywords: E0425, E0433, E0603, crate, cargo, dependency, feature flag, workspace, which crate to use, using external C libraries, creating Python extensions, PyO3, wasm, WebAssembly, bindgen, cbindgen, napi-rs, cannot find, private, crate recommendation, best crate for, Cargo.toml, features, crate ๆŽจ่, ไพ่ต–็ฎก็†, ็‰นๆ€งๆ ‡ๅฟ—, ๅทฅไฝœ็ฉบ้—ด, Python ็ป‘ๅฎš"

Current Dependencies (Auto-Injected)

!grep -A 100 '^\[dependencies\]' Cargo.toml 2>/dev/null | head -30 || echo "No Cargo.toml found"

---

# Ecosystem Integration

> Layer 2: Design Choices

Core Question

What's the right crate for this job, and how should it integrate?

Before adding dependencies:

  • Is there a standard solution?
  • What's the maintenance status?
  • What's the API stability?

---

Integration Decision โ†’ Implementation

| Need | Choice | Crates |

|------|--------|--------|

| Serialization | Derive-based | serde, serde_json |

| Async runtime | tokio or async-std | tokio (most popular) |

| HTTP client | Ergonomic | reqwest |

| HTTP server | Modern | axum, actix-web |

| Database | SQL or ORM | sqlx, diesel |

| CLI parsing | Derive-based | clap |

| Error handling | App vs lib | anyhow, thiserror |

| Logging | Facade | tracing, log |

---

Thinking Prompt

Before adding a dependency:

  1. Is it well-maintained?

- Recent commits?

- Active issue response?

- Breaking changes frequency?

  1. What's the scope?

- Do you need the full crate or just a feature?

- Can feature flags reduce bloat?

  1. How does it integrate?

- Trait-based or concrete types?

- Sync or async?

- What bounds does it require?

---

Trace Up โ†‘

To domain constraints (Layer 3):

```

"Which HTTP framework should I use?"

โ†‘ Ask: What are the performance requirements?

โ†‘ Check: domain-web (latency, throughput needs)

โ†‘ Check: Team expertise (familiarity with framework)

```

| Question | Trace To | Ask |

|----------|----------|-----|

| Framework choice | domain-* | What constraints matter? |

| Library vs build | domain-* | What's the deployment model? |

| API design | domain-* | Who are the consumers? |

---

Trace Down โ†“

To implementation (Layer 1):

```

"Integrate external crate"

โ†“ m04-zero-cost: Trait bounds and generics

โ†“ m06-error-handling: Error type compatibility

"FFI integration"

โ†“ unsafe-checker: Safety requirements

โ†“ m12-lifecycle: Resource cleanup

```

---

Quick Reference

Language Interop

| Integration | Crate/Tool | Use Case |

|-------------|------------|----------|

| C/C++ โ†’ Rust | bindgen | Auto-generate bindings |

| Rust โ†’ C | cbindgen | Export C headers |

| Python โ†” Rust | pyo3 | Python extensions |

| Node.js โ†” Rust | napi-rs | Node addons |

| WebAssembly | wasm-bindgen | Browser/WASI |

Cargo Features

| Feature | Purpose |

|---------|---------|

| [features] | Optional functionality |

| default = [...] | Default features |

| feature = "serde" | Conditional deps |

| [workspace] | Multi-crate projects |

Error Code Reference

| Error | Cause | Fix |

|-------|-------|-----|

| E0433 | Can't find crate | Add to Cargo.toml |

| E0603 | Private item | Check crate docs |

| Feature not enabled | Optional feature | Enable in features |

| Version conflict | Incompatible deps | cargo update or pin |

| Duplicate types | Different crate versions | Unify in workspace |

---

Crate Selection Criteria

| Criterion | Good Sign | Warning Sign |

|-----------|-----------|--------------|

| Maintenance | Recent commits | Years inactive |

| Community | Active issues/PRs | No response |

| Documentation | Examples, API docs | Minimal docs |

| Stability | Semantic versioning | Frequent breaking |

| Dependencies | Minimal, well-known | Heavy, obscure |

---

Anti-Patterns

| Anti-Pattern | Why Bad | Better |

|--------------|---------|--------|

| extern crate | Outdated (2018+) | Just use |

| #[macro_use] | Global pollution | Explicit import |

| Wildcard deps * | Unpredictable | Specific versions |

| Too many deps | Supply chain risk | Evaluate necessity |

| Vendoring everything | Maintenance burden | Trust crates.io |

---

Related Skills

| When | See |

|------|-----|

| Error type design | m06-error-handling |

| Trait integration | m04-zero-cost |

| FFI safety | unsafe-checker |

| Resource management | m12-lifecycle |

More from this repository10

๐Ÿช
actionbook-rust-skills๐ŸชMarketplace

Comprehensive Rust development assistant with meta-question routing, coding guidelines, version queries, and ecosystem support

๐ŸŽฏ
coding-guidelines๐ŸŽฏSkill

Provides comprehensive Rust coding guidelines covering naming conventions, best practices, error handling, memory management, concurrency, and code style recommendations.

๐ŸŽฏ
rust-refactor-helper๐ŸŽฏSkill

Performs safe Rust refactoring by analyzing symbol references, dependencies, and potential impacts using Language Server Protocol (LSP) operations.

๐ŸŽฏ
m09-domain๐ŸŽฏSkill

Guides domain modeling in Rust by helping identify entities, value objects, aggregates, and their ownership patterns with domain-driven design principles.

๐ŸŽฏ
m05-type-driven๐ŸŽฏSkill

Enforces compile-time type safety by preventing invalid states through type-level design techniques like newtypes, type states, and phantom types.

๐ŸŽฏ
rust-learner๐ŸŽฏSkill

Retrieves and provides comprehensive Rust and crate information, including versions, features, documentation, and changelogs from authoritative sources.

๐ŸŽฏ
m02-resource๐ŸŽฏSkill

Guides developers in selecting the right smart pointer and resource management strategy based on ownership, thread safety, and design constraints.

๐ŸŽฏ
rust-trait-explorer๐ŸŽฏSkill

Explores Rust trait implementations, revealing which types implement specific traits and their implementation details using LSP.

๐ŸŽฏ
rust-call-graph๐ŸŽฏSkill

Generates and visualizes Rust function call graphs using LSP, revealing function relationships and call hierarchies.

๐ŸŽฏ
m12-lifecycle๐ŸŽฏSkill

Guides resource lifecycle design by analyzing creation, usage, cleanup strategies, and ownership patterns for efficient and safe resource management in Rust.