agentleFS
JSBtechnologiesJSBtechnologies/rustkb/skills/rust-ecosystem/SKILL.md

rust-ecosystem

Skill0 starsChanged 43 days agoMITView on GitHub

Choosing Rust crates with verified current versions. Use when adding a dependency or running cargo add, asking "which crate for X" or "what's the best Rust library for Y", comparing crates (axum vs actix-web, sqlx vs diesel vs sea-orm, jiff vs chrono, reqwest vs ureq), replacing deprecated or unmaintained crates (lazy_static, once_cell, structopt, failure, async-std, serde_yaml, bincode, atty, dotenv...), reviewing or writing Cargo.toml dependencies, versions and features, or picking crates for web, HTTP, async, serialization, databases, CLI/TUI, logging/tracing, testing, crypto/TLS, GUI, wasm, embedded, ML/data or FFI.

  • Reads credentials
  • Installs packages

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. huiali/rust-skills★ 47same name
    2. adxptived/Rust-Skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When these tools are available, prefer them over the static versions in this skill.

    line 27
  2. Very specific:

    Before using any crate, check it is not tier = "avoid".

    line 110

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Rust ecosystem: which crate, which version

Agents fail here in predictable ways: an old major version typed from memory, a deprecated crate from old training data, a crate std has replaced, or every default feature switched on. This skill gives the current default per domain, verified against crates.io, GitHub and RustSec on 2026-09-29 (Rust 1.96, edition 2024).

catalog.toml (in this skill) is the machine-readable catalog: about 200 crates with category, tier (default / recommended / situational / avoid), verified version, use_for, avoid_when, alternatives and replaces. The rustkb MCP server reads it.

  • recommend_crates — ranked catalog entries for a need, with live crates.io versions.
  • crate_info — one crate's catalog entry, live version, maintenance and advisory status.
  • check_advisories — RustSec advisories for a crate or lockfile.
  • search / get_item — versioned API docs for tracked crates. When these tools are available, prefer them over the static versions in this skill.

Core rules

IDRule
DEP-01Check std first: LazyLock/OnceLock, IsTerminal, available_parallelism, thread::scope, File::lock, cfg_select!, native async fn in traits
DEP-03Check maintenance before recommending: RustSec advisory, last release, archived repo
DEP-04Pick the catalog's tier = "default" crate unless you can state a reason
DEP-05Write versions as caret "MAJOR.MINOR"; commit Cargo.lock
DEP-06Enable only the features you use; libraries set default-features = false on heavy deps
DEP-07Check rust-version (MSRV) of new deps against yours
DEP-11Never type a version from memory: cargo add, crate_info, or crates.io
DEP-12Replace avoid-tier crates when you touch the code that uses them
NET-01Async runtime: tokio; never async-std (discontinued)
WEB-01Web server: axum + tower-http; HTTP client: reqwest (async, rustls by default since 0.13) or ureq (sync)
SER-03YAML: serde-saphyr (serde_yaml deprecated, serde_yml unsound)
SER-04Binary serde: postcard (bincode discontinued; 3.0.0 is a compile-error tombstone)
DB-01SQL: sqlx (raw SQL, checked); diesel or sea-orm when you want an ORM/DSL
TXT-01Date/time: jiff for new code; chrono where APIs require it; never Local::now() in servers
TEL-01Instrumentation: tracing + tracing-subscriber; OTel crates all on one minor
UTIL-01Errors: thiserror in libraries, anyhow at application edges
UTIL-07rand 0.10: rand::rng(), random_range, use rand::RngExt
TST-07Test runner: cargo-nextest (+ cargo test --doc); coverage: cargo-llvm-cov
DOM-01TLS: rustls (aws-lc-rs provider); openssl only when mandated

Current defaults at a glance (verified 2026-09-29)

NeedDefaultVersion
Async runtimetokio1.53
Web framework / middlewareaxum / tower-http0.8 / 0.7
HTTP client async / syncreqwest / ureq0.13 / 3.4
gRPCtonic + prost (codegen: tonic-prost-build)0.14 / 0.14
Serializationserde + serde_json1.0 / 1.0
TOML / YAMLtoml / serde-saphyr1.1 / 1.3
SQL / SQLitesqlx / rusqlite0.9 / 0.40
CLI / TUIclap (derive) / ratatui4.6 / 0.30
Errorsthiserror / anyhow2.0 / 1.0
Logging & tracingtracing / tracing-subscriber0.1 / 0.3
Date & timejiff0.2
Parsingwinnow1.0
Parallelismrayon1.12
Testingproptest / insta / rstest1.11 / 1.48 / 0.27
TLSrustls0.23
Proc macrossyn / quote3.0 / 1.0

Routing: which reference to read

SituationRead
Should I add this crate? Evaluating maintenance, features, MSRV, license; std replacementsreferences/dependency-policy.md
Crate is old/deprecated/unmaintained; migration targets; stale APIs agents write from memoryreferences/deprecated-and-replacements.md
tokio, futures, cancellation, channels, retries, WebSockets, gRPC, QUIC, DNS, brokersreferences/async-and-networking.md
Web server, middleware, OpenAPI, sessions/JWT, HTTP clients, emailreferences/web-and-http.md
serde, JSON/TOML/YAML/binary formats, CSV/XML/protobuf, config loading, .envreferences/data-and-serialization.md
Dates/times/time zones, regex, parsing (winnow/nom/pest/logos), Unicode, Markdown, templatesreferences/text-time-and-parsing.md
SQL toolkits/ORMs, SQLite, Redis, MongoDB, embedded KV, pools, cachesreferences/databases.md
CLI parsing, colours, prompts, progress, config dirs, TUIsreferences/cli-and-tui.md
tracing, log, OpenTelemetry, metrics, Sentry, tokio-consolereferences/observability-crates.md
Error crates, rayon, locks/concurrent maps, collections, hashing, rand, UUIDs, proc-macro toolingreferences/core-utilities.md
Property/snapshot/parameterized tests, mocks, HTTP fakes, nextest, coverage, benchmarks, profilingreferences/testing-and-benchmarking.md
TLS/crypto pointers, GUI, wasm, embedded, data/ML, FFI (pyo3, napi, cxx, bindgen), cloud, filesreferences/domain-specific.md
A crate not covered abovecatalog.toml, then recommend_crates / crate_info

Related skills

  • rust-idioms — how to use std and the language well (errors, async, concurrency, testing style).
  • rust-architecture — workspaces, service/CLI structure, config and observability design, CI.
  • rust-security — supply-chain policy (cargo-deny/vet), crypto choices in depth, unsafe review, fuzzing.

Using the catalog directly

[[crate]]
name = "serde-saphyr"
category = "serialization"
tier = "default"                # default | recommended | situational | avoid
version = "1.3"                 # crates.io major.minor at verification time
replaces = ["serde_yaml", "serde_yml"]
  • To find the default for a category: filter tier = "default" and category.
  • Before using any crate, check it is not tier = "avoid"; if it is, use its alternatives.
  • category = "tool" entries are cargo subcommands to install (cargo install / cargo binstall), never [dependencies].
  • Versions drift: the catalog records what was current on the verification date; live versions come from crate_info or crates.io.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.