1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! 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.
// Cross-cutting types re-exported at crate root
pub use CrateCollection;
pub use GlobalItemId;
pub use UnknownItemPath;
/// Crate version - used as part of cache fingerprint.
pub const CRATE_VERSION: &str = env!;
/// Standard library crate package ID representation.
pub const STD_PACKAGE_ID_REPR: &str = "std";
/// Core crate package ID representation.
pub const CORE_PACKAGE_ID_REPR: &str = "core";
/// Alloc crate package ID representation.
pub const ALLOC_PACKAGE_ID_REPR: &str = "alloc";
/// The set of toolchain crates that are bundled with Rust.
pub const TOOLCHAIN_CRATES: = ;
/// Return the options to pass to `rustdoc` in order to generate JSON documentation.
///
/// We isolate this logic in a separate function in order to be able to refer to these
/// options from various places in the codebase and maintain a single source of truth.
///
/// In particular, they do affect our caching logic (see the `cache` module).
pub