24 releases

new 0.8.8 Nov 29, 2023
0.8.6 Jun 3, 2023
0.8.4 Mar 28, 2023
0.7.4 Dec 28, 2022
0.2.2 Jul 12, 2022

#63 in Cargo plugins

Download history 7824/week @ 2023-08-09 7026/week @ 2023-08-16 2405/week @ 2023-08-23 1674/week @ 2023-08-30 1705/week @ 2023-09-06 1689/week @ 2023-09-13 2157/week @ 2023-09-20 1937/week @ 2023-09-27 2367/week @ 2023-10-04 2015/week @ 2023-10-11 2218/week @ 2023-10-18 1815/week @ 2023-10-25 1703/week @ 2023-11-01 2196/week @ 2023-11-08 2420/week @ 2023-11-15 1871/week @ 2023-11-22

8,536 downloads per month
Used in 13 crates (7 directly)

MIT license

20KB
325 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.

Dependencies

~2–2.8MB
~56K SLoC