{"id":28401240,"url":"https://github.com/BD103/migrate_rustdoc_json","last_synced_at":"2025-06-28T13:31:54.250Z","repository":{"id":295117208,"uuid":"988732909","full_name":"BD103/migrate_rustdoc_json","owner":"BD103","description":"Migrate Rustdoc's JSON output to newer format versions","archived":false,"fork":false,"pushed_at":"2025-06-17T03:33:09.000Z","size":85,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T04:26:12.449Z","etag":null,"topics":["rustdoc","rustdoc-json"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BD103.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-23T02:01:28.000Z","updated_at":"2025-06-17T03:33:12.000Z","dependencies_parsed_at":"2025-05-23T18:32:07.598Z","dependency_job_id":"75af7cac-595e-49fe-84d6-e1b6af86613c","html_url":"https://github.com/BD103/migrate_rustdoc_json","commit_stats":null,"previous_names":["bd103/migrate_rustdoc_types"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/BD103/migrate_rustdoc_json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BD103%2Fmigrate_rustdoc_json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BD103%2Fmigrate_rustdoc_json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BD103%2Fmigrate_rustdoc_json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BD103%2Fmigrate_rustdoc_json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BD103","download_url":"https://codeload.github.com/BD103/migrate_rustdoc_json/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BD103%2Fmigrate_rustdoc_json/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262437900,"owners_count":23311054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rustdoc","rustdoc-json"],"created_at":"2025-06-01T11:38:11.895Z","updated_at":"2025-06-28T13:31:54.245Z","avatar_url":"https://github.com/BD103.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Migrate Rustdoc JSON\n\nMigrate Rustdoc's JSON output to newer format versions.\n\n## Why is this useful?\n\nThere are [several tools](https://crates.io/crates/rustdoc-types/reverse_dependencies) that read Rustdoc's JSON format, the largest of which being [`cargo-semver-checks`](https://github.com/obi1kenobi/cargo-semver-checks) and [`cargo-public-api`](https://github.com/cargo-public-api/cargo-public-api).\n\nThese tools either support only a _specific_ format version of the JSON or do not support comparing JSON with _different_ format versions. This is an issue for projects that depend on [the compiler's internal APIs](https://doc.rust-lang.org/nightly/unstable-book/language-features/rustc-private.html) (`rustc` drivers) and for projects that require an older, unsupported compiler.\n\n## Installation\n\nYou can install the latest release of `migrate_rustdoc_json` with `cargo install`:\n\n```sh\ncargo install migrate_rustdoc_json --locked\n```\n\nYou can install the latest unstable version from Git:\n\n```sh\ncargo install --git https://github.com/BD103/migrate_rustdoc_json --locked\n```\n\n## Quick Start\n\n```sh\nmigrate_rustdoc_json --input path/to/rustdoc.json --to-version latest \u003e migrated.json\n```\n\n## Usage\n\nIn order to migrate Rustdoc's JSON output, you must first build the original JSON:\n\n```sh\n# Build Rustdoc JSON for a crate.\ncargo +nightly rustdoc -- -Zunstable-options --output-format json\n```\n\nYou'll likely need to change `+nightly` to a specific toolchain. You may also be interested in passing `--document-hidden-items` and `--document-private-items`.\n\nOnce you've built the JSON, you can use `migrate_rustdoc_json` to migrate it to a later version:\n\n```sh\n# Migrate the Rustdoc JSON to a newer format version.\nmigrate_rustdoc_json --input target/doc/crate_name.json --to-version 45 \u003e migrated.json\n```\n\n`migrate_rustdoc_json` prints the migrated JSON to `stdout`, which is why you need to pipe it to a file with `\u003e migrated.json`. This tool only supports migrating to newer format versions (such as v43 to v45). **Migrating down (such as v46 to v42) is unsupported.**\n\n## Compatibility\n\n|`merge_rustdoc_json` Version|Format Version|\n|-|-|\n|v0.4.0-dev|v41..=v46|\n|v0.3.0|v41..=v46|\n|v0.2.0|v41..=v45|\n|v0.1.0|v41..=v45|\n\nThis table shows which range of format versions a given release of `merge_rustdoc_json` supports. `merge_rustdoc_json` can read any JSON within the range, and can migrate it to any greater version within the range.\n\n## History\n\nThis tool was originally created for the [Bevy Linter](https://thebevyflock.github.io/bevy_cli/linter/index.html) to assist with updating to newer versions of the Rust compiler and [`clippy_utils`](https://crates.io/crates/clippy_utils). Since neither dependency provides an internal changelog and each release requires a different Rust compiler version, `migrate_rustdoc_json` was created to allow viewing the breaking changes with `cargo-semver-checks`.\n\n## License\n\n`migrate_rustdoc_json` is licensed under either of\n\n- Apache License, Version 2.0 ([`LICENSE-APACHE`](LICENSE-APACHE) or \u003chttps://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([`LICENSE-MIT`](LICENSE-MIT) or \u003chttps://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n## Contributing\n\nCheck out [`CONTRIBUTING.md`](CONTRIBUTING.md) if you're interested in helping out!\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBD103%2Fmigrate_rustdoc_json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBD103%2Fmigrate_rustdoc_json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBD103%2Fmigrate_rustdoc_json/lists"}