29 releases

new 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

#33 in Cargo plugins

Download history 3394/week @ 2024-07-30 4690/week @ 2024-08-06 4516/week @ 2024-08-13 3227/week @ 2024-08-20 4307/week @ 2024-08-27 3851/week @ 2024-09-03 3782/week @ 2024-09-10 3362/week @ 2024-09-17 4066/week @ 2024-09-24 8226/week @ 2024-10-01 7908/week @ 2024-10-08 10199/week @ 2024-10-15 9184/week @ 2024-10-22 10081/week @ 2024-10-29 11332/week @ 2024-11-05 9021/week @ 2024-11-12

41,107 downloads per month
Used in 18 crates (12 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
~64K SLoC