Skip to main content

Crate rustdoc_processor

Crate rustdoc_processor 

Source
Expand description

Compute, cache, index, and query rustdoc JSON documentation for crates in a project’s dependency graph.

The pipeline:

  1. Compute (compute::compute_crate_docs): invoke cargo rustdoc to generate JSON docs.
  2. Cache (cache::RustdocGlobalFsCache): persist raw docs and secondary indexes in a SQLite database at {cache_dir}/{fingerprint}.db.
  3. Index (indexing): build secondary indexes — import paths, item lookups, and external re-export tracking.
  4. Query (queries::Crate, CrateCollection): look up items by path, resolve cross-crate references, and retrieve canonical import paths.

Modules§

cache
SQLite-based caching for rustdoc JSON documentation.
compute
Orchestrate cargo rustdoc invocations to generate JSON documentation.
crate_data
Core rustdoc data types.
indexing
Build secondary indexes from raw rustdoc JSON output.
queries
Query layer for looking up items across crates.

Structs§

CrateCollection
The main entrypoint for accessing the documentation of the crates in a specific PackageGraph.
GlobalItemId
An identifier that unequivocally points to a type within a crate collection.
UnknownItemPath
Error type representing a path that could not be found in the rustdoc index.

Constants§

ALLOC_PACKAGE_ID_REPR
Alloc crate package ID representation.
CORE_PACKAGE_ID_REPR
Core crate package ID representation.
CRATE_VERSION
Crate version - used as part of cache fingerprint.
STD_PACKAGE_ID_REPR
Standard library crate package ID representation.
TOOLCHAIN_CRATES
The set of toolchain crates that are bundled with Rust.