Crates.io | rustdoc-json |
lib.rs | rustdoc-json |
version | 0.9.3 |
source | src |
created_at | 2022-06-30 19:58:44.422337 |
updated_at | 2024-11-15 05:56:07.173424 |
description | Utilities for working with rustdoc JSON. |
homepage | https://github.com/cargo-public-api/cargo-public-api/tree/main/rustdoc-json |
repository | https://github.com/cargo-public-api/cargo-public-api/tree/main/rustdoc-json |
max_upload_size | |
id | 616680 |
size | 60,900 |
A library for programmatically working with rustdoc JSON.
To build rustdoc JSON for a library with the manifest path project/Cargo.toml
, do like this:
let json_path = rustdoc_json::Builder::default()
.toolchain("nightly")
.manifest_path("project/Cargo.toml")
.build()
.unwrap();
// Prints `Wrote rustdoc JSON to "/Users/martin/src/project/target/doc/project.json"`
println!("Wrote rustdoc JSON to {:?}", &json_path);
There are many more build options. See the docs to learn about all of them.
Please refer to CHANGELOG.md.
This library is indirectly and heavily tested through the public-api
and cargo-public-api
test suites. Their tests heavily depend on this library, so if all of their tests pass, then this library works as it should. All tests are of course ensured to pass before a new release is made.
"Rust" and "Cargo" are trademarks of the Rust Foundation. This project is not affiliated with, endorsed by, or otherwise associated with the Rust Project or Rust Foundation.