29 releases

0.9.3 Nov 15, 2024
0.9.2 Jul 26, 2024
0.9.1 May 23, 2024
0.8.9 Jan 28, 2024
0.2.2 Jul 12, 2022

#30 in Cargo plugins

Download history 4193/week @ 2024-08-04 4849/week @ 2024-08-11 3581/week @ 2024-08-18 4112/week @ 2024-08-25 3597/week @ 2024-09-01 3908/week @ 2024-09-08 3369/week @ 2024-09-15 3896/week @ 2024-09-22 7129/week @ 2024-09-29 7955/week @ 2024-10-06 10643/week @ 2024-10-13 8916/week @ 2024-10-20 9840/week @ 2024-10-27 11297/week @ 2024-11-03 10820/week @ 2024-11-10 10958/week @ 2024-11-17

43,297 downloads per month
Used in 21 crates (14 directly)

MIT license

25KB
403 lines

rustdoc-json

A library for programmatically working with rustdoc JSON.

Build 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.

Changelog

Please refer to CHANGELOG.md.

Tests

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.

Trademark Notice

"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.

Dependencies

~2.2–3.5MB
~63K SLoC