Menu

Post image 1
Post image 2
Post image 3
Post image 4
1 / 4
0

Why I built cargo-feat: A 10ms solution to feature lookup friction

DEV Community·vun·about 1 month ago
#haCyZO21
#rust#cargo#tooling#feat#fullscreen#default
Reading 0:00
15s threshold

The Problem Every time I add a dependency to Cargo.toml, I need to know what features it exposes. Current workflow: Open browser Search crates.io or docs.rs Scroll through documentation Find the feature list Close browser Repeat 20 times a day. Annoying. Existing tools like cargo info exist but are slow (80ms+). The Solution Built cargo-feat. Single command. Shows every feature, marks defaults, lists what each feature pulls in. $ feat reqwest — reqwest's features are in the following list — ★ default default-tls charset http2 system-proxy — blocking — brotli — charset (default) ... Enter fullscreen mode Exit fullscreen mode Done in 9.9ms. Why It's Fast Three optimizations: Sparse registry index — reads crates.io sparse index directly (via Cloudflare CDN). Cargo uses same source. Faster than REST API. Local cache first — checks ~/.cargo/registry/index/ before network. If you've ever built with this crate, result is instant. After network fetch, written to cache. Next run: always fast.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More