Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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::Deserializeserde
  • extern crate serdeserde
  • serde_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::Runtimetokio
  • use serde_json::Valueserde-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.