35 releases

Uses new Rust 2024

0.9.9 Feb 26, 2026
0.9.8 Dec 19, 2025
0.9.7 Aug 2, 2025
0.9.6 May 27, 2025
0.2.2 Jul 12, 2022

#176 in Cargo plugins

Download history 8794/week @ 2025-11-27 7853/week @ 2025-12-04 9165/week @ 2025-12-11 4836/week @ 2025-12-18 2573/week @ 2025-12-25 5689/week @ 2026-01-01 9706/week @ 2026-01-08 12362/week @ 2026-01-15 14513/week @ 2026-01-22 13813/week @ 2026-01-29 13675/week @ 2026-02-05 15089/week @ 2026-02-12 12230/week @ 2026-02-19 17523/week @ 2026-02-26 13867/week @ 2026-03-05 13031/week @ 2026-03-12

59,146 downloads per month
Used in 47 crates (35 directly)

MIT license

26KB
416 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.

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

~8–11MB
~139K SLoC