26 releases

0.9.0 Apr 2, 2024
0.8.9 Jan 28, 2024
0.8.8 Nov 29, 2023
0.8.6 Jun 3, 2023
0.2.2 Jul 12, 2022

#55 in Development tools

Download history 1349/week @ 2023-12-22 1389/week @ 2023-12-29 1906/week @ 2024-01-05 2265/week @ 2024-01-12 2447/week @ 2024-01-19 2801/week @ 2024-01-26 1618/week @ 2024-02-02 2041/week @ 2024-02-09 3684/week @ 2024-02-16 2305/week @ 2024-02-23 2023/week @ 2024-03-01 3729/week @ 2024-03-08 3417/week @ 2024-03-15 3013/week @ 2024-03-22 3240/week @ 2024-03-29 5232/week @ 2024-04-05

15,319 downloads per month
Used in 12 crates (9 directly)

MIT license

20KB
342 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–3MB
~62K SLoC