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

#65 in Cargo plugins

Download history 3476/week @ 2024-08-19 4245/week @ 2024-08-26 3573/week @ 2024-09-02 3885/week @ 2024-09-09 3349/week @ 2024-09-16 3923/week @ 2024-09-23 7213/week @ 2024-09-30 7810/week @ 2024-10-07 10698/week @ 2024-10-14 8890/week @ 2024-10-21 9755/week @ 2024-10-28 11357/week @ 2024-11-04 11079/week @ 2024-11-11 10692/week @ 2024-11-18 10256/week @ 2024-11-25 11830/week @ 2024-12-02

44,112 downloads per month
Used in 22 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