Rust
Manifest
Cargo.toml — extracts crate names from [dependencies], [dev-dependencies], and [build-dependencies]. Handles both crate = "version" and crate = { version = "...", package = "..." } forms.
When package = "actual-name" is present, the actual name is used for matching.
Import scanning
Uses tree-sitter with the Rust grammar. Extracts from:
use serde::Deserialize→serdeextern crate serde→serdeserde_json::from_str!(...)→serde_json(macro invocations with::path)
All Rust imports are static — confidence is always high.
Normalization
Takes the first path segment and replaces _ with - for Cargo matching:
use tokio::runtime::Runtime→tokiouse serde_json::Value→serde-json
Stdlib detection
std, core, alloc, proc_macro, test, plus the relative paths self, super, crate.
Aliases
Built dynamically from Cargo.toml. If you have:
[dependencies]
my_serde = { version = "1", package = "serde" }
Then use my_serde::Deserialize correctly resolves to the serde crate.