os-rust/src/rustdoc-json-types
Trevor Gross 05c0591321
Rollup merge of #130078 - its-the-shrimp:rustdoc-types-compress-ids, r=aDotInTheVoid
rustdoc-json: change item ID's repr from a string to an int

Following [this discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Optimizing.20the.20.60Id.60.20type.20in.20.60rustdoc-types.60), I've changed the repr of `rustdoc_json_types::Id` from a String to a u32, by adding a `clean::ItemId` interner to `JsonRenderer`

r? ``@aDotInTheVoid``
2024-10-11 16:53:46 -05:00
..
Cargo.toml Verify that ItemEnum can be serialized and then deserialized using bincode 2023-05-22 18:26:20 +01:00
lib.rs Rollup merge of #130078 - its-the-shrimp:rustdoc-types-compress-ids, r=aDotInTheVoid 2024-10-11 16:53:46 -05:00
README.md Fix README typo 2021-01-28 11:15:43 -05:00
tests.rs rustdoc: normalise type/field names in rustdoc-json-types/jsondoclint 2024-09-01 23:58:08 +03:00

Rustdoc JSON Types

This crate exposes the Rustdoc JSON API as a set of types with serde implementations. These types are part of the public interface of the rustdoc JSON output, and making them their own crate allows them to be versioned and distributed without having to depend on any rustc/rustdoc internals. This way, consumers can rely on this crate for both documentation of the output, and as a way to read the output easily, and its versioning is intended to follow semver guarantees about the version of the format. JSON format X will always be compatible with rustdoc-json-types version N.

Currently, this crate is only used by rustdoc itself. Upon the stabilization of rustdoc-json, it may be distributed separately for consumers of the API.