PluginBench
Skill
Fail
Audit score 45

m11-ecosystem

actionbook/rust-skills

How to install m11-ecosystem

npx skills add https://github.com/actionbook/rust-skills --skill m11-ecosystem
Claude Code
Cursor
Windsurf
Cline
Full instructions (SKILL.md)

Source of truth, from actionbook/rust-skills.


name: m11-ecosystem description: "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 绑定" user-invocable: false

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

NeedChoiceCrates
SerializationDerive-basedserde, serde_json
Async runtimetokio or async-stdtokio (most popular)
HTTP clientErgonomicreqwest
HTTP serverModernaxum, actix-web
DatabaseSQL or ORMsqlx, diesel
CLI parsingDerive-basedclap
Error handlingApp vs libanyhow, thiserror
LoggingFacadetracing, log

Thinking Prompt

Before adding a dependency:

  1. Is it well-maintained?

    • Recent commits?
    • Active issue response?
    • Breaking changes frequency?
  2. What's the scope?

    • Do you need the full crate or just a feature?
    • Can feature flags reduce bloat?
  3. 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)
QuestionTrace ToAsk
Framework choicedomain-*What constraints matter?
Library vs builddomain-*What's the deployment model?
API designdomain-*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

IntegrationCrate/ToolUse Case
C/C++ → RustbindgenAuto-generate bindings
Rust → CcbindgenExport C headers
Python ↔ Rustpyo3Python extensions
Node.js ↔ Rustnapi-rsNode addons
WebAssemblywasm-bindgenBrowser/WASI

Cargo Features

FeaturePurpose
[features]Optional functionality
default = [...]Default features
feature = "serde"Conditional deps
[workspace]Multi-crate projects

Error Code Reference

ErrorCauseFix
E0433Can't find crateAdd to Cargo.toml
E0603Private itemCheck crate docs
Feature not enabledOptional featureEnable in features
Version conflictIncompatible depscargo update or pin
Duplicate typesDifferent crate versionsUnify in workspace

Crate Selection Criteria

CriterionGood SignWarning Sign
MaintenanceRecent commitsYears inactive
CommunityActive issues/PRsNo response
DocumentationExamples, API docsMinimal docs
StabilitySemantic versioningFrequent breaking
DependenciesMinimal, well-knownHeavy, obscure

Anti-Patterns

Anti-PatternWhy BadBetter
extern crateOutdated (2018+)Just use
#[macro_use]Global pollutionExplicit import
Wildcard deps *UnpredictableSpecific versions
Too many depsSupply chain riskEvaluate necessity
Vendoring everythingMaintenance burdenTrust crates.io

Related Skills

WhenSee
Error type designm06-error-handling
Trait integrationm04-zero-cost
FFI safetyunsafe-checker
Resource managementm12-lifecycle

Related skills

More from actionbook/rust-skills and the wider catalog.

CO

coding-guidelines

actionbook/rust-skills

Use when asking about Rust code style or best practices. Keywords: naming, formatting, comment, clippy, rustfmt, lint, code style, best practice, P.NAM, G.FMT, code review, naming convention, variable naming, function naming, type naming, 命名规范, 代码风格, 格式化, 最佳实践, 代码审查, 怎么命名

1.2k installsAudited
M0

m07-concurrency

actionbook/rust-skills

CRITICAL: Use for concurrency/async. Triggers: E0277 Send Sync, cannot be sent between threads, thread, spawn, channel, mpsc, Mutex, RwLock, Atomic, async, await, Future, tokio, deadlock, race condition, 并发, 线程, 异步, 死锁

1.2k installsAudited
M1

m10-performance

actionbook/rust-skills

CRITICAL: Use for performance optimization. Triggers: performance, optimization, benchmark, profiling, flamegraph, criterion, slow, fast, allocation, cache, SIMD, make it faster, 性能优化, 基准测试

1.2k installsAudited
M0

m06-error-handling

actionbook/rust-skills

CRITICAL: Use for error handling. Triggers: Result, Option, Error, ?, unwrap, expect, panic, anyhow, thiserror, when to panic vs return Result, custom error, error propagation, 错误处理, Result 用法, 什么时候用 panic

1.2k installsAudited
M0

m01-ownership

actionbook/rust-skills

CRITICAL: Use for ownership/borrow/lifetime issues. Triggers: E0382, E0597, E0506, E0507, E0515, E0716, E0106, value moved, borrowed value does not live long enough, cannot move out of, use of moved value, ownership, borrow, lifetime, 'a, 'static, move, clone, Copy, 所有权, 借用, 生命周期

1.2k installsAudited
M0

m02-resource

actionbook/rust-skills

CRITICAL: Use for smart pointers and resource management. Triggers: Box, Rc, Arc, Weak, RefCell, Cell, smart pointer, heap allocation, reference counting, RAII, Drop, should I use Box or Rc, when to use Arc vs Rc, 智能指针, 引用计数, 堆分配

1.2k installsAudited