Expand description
Harvest crates.io → docs.rs links from Cargo.toml (+ optional Cargo.lock).
Used by bootstrap/setup so agents can rustbrain query serde and land on a
note with the correct docs.rs URL. Purely algorithmic — no network fetch of
docs HTML (URLs follow the public docs.rs convention).
§What is included
- Direct deps from every
Cargo.tomlunder the workspace (skiptarget/, …) - Sections:
[dependencies],[dev-dependencies],[build-dependencies], and[workspace.dependencies] - Exact versions from
Cargo.lockwhen present (better docs.rs deep links)
§What is skipped
path = "…"dependencies (local crates — not on docs.rs)- Renamed packages use the package name for docs.rs, not the key
§Output
docs/references/crate-docs.generated.md— index of all harvested depsdocs/references/crates/{crate}.md— one note per crates.io package (node_type: reference,generated: true)
Structs§
- Crate
Dep - One direct dependency harvested from a manifest.
Functions§
- collect_
crate_ deps - Collect unique crates.io dependencies from a workspace tree.
- crates_
io_ url - crates.io URL for a package.
- docs_
rs_ url - docs.rs URL for a package (optionally pinned to an exact version).
- write_
crate_ docs_ notes - Write index + per-crate notes under
docs/references/.