Expand description
Rustdoc JSON parsing module.
This module handles loading and parsing rustdoc JSON files into the
rustdoc_types::Crate structure that represents the entire documented crate.
§Rustdoc JSON Format
Rustdoc JSON is generated by running:
cargo doc --output-format jsonThe output is a single JSON file at target/doc/{crate_name}.json containing:
- The crate’s module hierarchy
- All public (and optionally private) items
- Documentation strings
- Type information and generics
- Cross-reference links between items
§Key Types
The parsed Crate contains:
root: ID of the root moduleindex:HashMapof all items by their IDpaths:HashMapmapping IDs to their full module pathscrate_version: Optional version string
§Performance
When the simd-json feature is enabled, parsing uses SIMD-accelerated
JSON parsing which is significantly faster for large rustdoc JSON files
(10-50MB+). This requires AVX2/SSE4.2 on x86 platforms.
Structs§
- Parser
- Parser for rustdoc JSON files.