Skip to content

rustdoc-json-types: Replace bincode dev-dependency with postcard#158077

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Turbo87:bincode-replacement
Jun 18, 2026
Merged

rustdoc-json-types: Replace bincode dev-dependency with postcard#158077
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Turbo87:bincode-replacement

Conversation

@Turbo87

@Turbo87 Turbo87 commented Jun 18, 2026

Copy link
Copy Markdown
Member

bincode is flagged as unmaintained by RUSTSEC-2025-0141, and the advisory covers the entire crate with no patched version available. The only use in rustdoc-json-types was the binary serde roundtrip in the type tests.

postcard is a maintained serde-based binary serialization format that covers the same roundtrip testing need.

bincode is still pulled in transitively by the miri subtree (via ipc-channel), which needs to be addressed upstream.

Related

bincode is flagged as unmaintained by RUSTSEC-2025-0141, and the advisory
covers the entire crate with no patched version available. The only use
in this crate was the binary serde roundtrip in the type tests.

postcard (https://crates.io/crates/postcard) is a maintained serde-based
binary serialization format that covers the same roundtrip testing need.

bincode is still pulled in transitively by the miri subtree (via
ipc-channel), which needs to be addressed upstream.
@rustbot

rustbot commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

rustdoc-json-types is a public (although nightly-only) API. If possible, consider changing src/librustdoc/json/conversions.rs; otherwise, make sure you bump the FORMAT_VERSION constant.

cc @CraftSpider, @aDotInTheVoid, @Enselic, @obi1kenobi

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 18, 2026
@rustbot

rustbot commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Mark-Simulacrum

@Mark-Simulacrum

Copy link
Copy Markdown
Member

r? rustdoc

But generally speaking seems fine. I do wonder if there's a dependency-free way to test roundtripping? But seems OK.

@Turbo87

Turbo87 commented Jun 18, 2026

Copy link
Copy Markdown
Member Author

I do wonder if there's a dependency-free way to test roundtripping

we already seems to be roundtripping through serde_json and rkyv, so this is just a third way of doing it. whether any of that is actually necessary idk 😅

@GuillaumeGomez

Copy link
Copy Markdown
Member

Feel free to send a PR if you have an idea on how to do it dependency-free. ;)

Thanks for the PR in any case!

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

📌 Commit fee82a3 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 18, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 18, 2026
…llaumeGomez

rustdoc-json-types: Replace bincode dev-dependency with postcard

bincode is flagged as unmaintained by [RUSTSEC-2025-0141](https://rustsec.org/advisories/RUSTSEC-2025-0141), and the advisory covers the entire crate with no patched version available. The only use in `rustdoc-json-types` was the binary serde roundtrip in the type tests.

[postcard](https://crates.io/crates/postcard) is a maintained serde-based binary serialization format that covers the same roundtrip testing need.

bincode is still pulled in transitively by the miri subtree (via `ipc-channel`), which needs to be [addressed upstream](rust-lang/miri#5115).

### Related

- rust-lang/miri#5115
rust-bors Bot pushed a commit that referenced this pull request Jun 18, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #157935 (Make `proc_macro::ConversionErrorKind` non exhaustive)
 - #158002 (Replace `unwrap` with `expect` in `get_module_children`)
 - #158071 (Update actions/checkout action to v6)
 - #158072 (Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103)
 - #158077 (rustdoc-json-types: Replace bincode dev-dependency with postcard)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 18, 2026
…llaumeGomez

rustdoc-json-types: Replace bincode dev-dependency with postcard

bincode is flagged as unmaintained by [RUSTSEC-2025-0141](https://rustsec.org/advisories/RUSTSEC-2025-0141), and the advisory covers the entire crate with no patched version available. The only use in `rustdoc-json-types` was the binary serde roundtrip in the type tests.

[postcard](https://crates.io/crates/postcard) is a maintained serde-based binary serialization format that covers the same roundtrip testing need.

bincode is still pulled in transitively by the miri subtree (via `ipc-channel`), which needs to be [addressed upstream](rust-lang/miri#5115).

### Related

- rust-lang/miri#5115
rust-bors Bot pushed a commit that referenced this pull request Jun 18, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #158026 (`RegionValues`: disable unnecessary range check)
 - #156795 (Handle generic reborrow in expression-use adjustment walking)
 - #157694 (Enhance documentation on wake call memory ordering)
 - #157935 (Make `proc_macro::ConversionErrorKind` non exhaustive)
 - #158002 (Replace `unwrap` with `expect` in `get_module_children`)
 - #158034 (Fix reborrow source expression visits)
 - #158072 (Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103)
 - #158074 (Document transient connection errors from TcpListener::accept)
 - #158077 (rustdoc-json-types: Replace bincode dev-dependency with postcard)
 - #158086 (renovate: Loosen dashboard approval and adopt recommended config)
rust-bors Bot pushed a commit that referenced this pull request Jun 18, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #158026 (`RegionValues`: disable unnecessary range check)
 - #156795 (Handle generic reborrow in expression-use adjustment walking)
 - #157694 (Enhance documentation on wake call memory ordering)
 - #157935 (Make `proc_macro::ConversionErrorKind` non exhaustive)
 - #158002 (Replace `unwrap` with `expect` in `get_module_children`)
 - #158034 (Fix reborrow source expression visits)
 - #158072 (Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103)
 - #158074 (Document transient connection errors from TcpListener::accept)
 - #158077 (rustdoc-json-types: Replace bincode dev-dependency with postcard)
 - #158086 (renovate: Loosen dashboard approval and adopt recommended config)
@aDotInTheVoid

Copy link
Copy Markdown
Member

whether any of that is actually necessary idk 😅

The JSON test was added because there was a bug where it wouldn’t roundtrip (because of #[serde(untagged)]. The postcard test was added because it used to only work on self describing formats (for serde reasons I can’t remember). The rkyv tests were added to check we got the rkyv derives correct (because they’re complicated and not serde)

We should defiantly keep all three.

rust-bors Bot pushed a commit that referenced this pull request Jun 18, 2026
Rollup of 12 pull requests

Successful merges:

 - #156795 (Handle generic reborrow in expression-use adjustment walking)
 - #157694 (Enhance documentation on wake call memory ordering)
 - #157935 (Make `proc_macro::ConversionErrorKind` non exhaustive)
 - #158002 (Replace `unwrap` with `expect` in `get_module_children`)
 - #158009 (Reject `impl const Trait` since the right syntax is `const impl Trait` now)
 - #158034 (Fix reborrow source expression visits)
 - #158072 (Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103)
 - #158074 (Document transient connection errors from TcpListener::accept)
 - #158077 (rustdoc-json-types: Replace bincode dev-dependency with postcard)
 - #158086 (renovate: Loosen dashboard approval and adopt recommended config)
 - #158088 (codegen_ssa: no dbginfo for scalable vec local w/ `-O0`)
 - #158089 (Fix invalid "jump-to-def" doc link generation when an item has a `derive` proc-macro)
@rust-bors rust-bors Bot merged commit 1813cd7 into rust-lang:main Jun 18, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 18, 2026
rust-timer added a commit that referenced this pull request Jun 18, 2026
Rollup merge of #158077 - Turbo87:bincode-replacement, r=GuillaumeGomez

rustdoc-json-types: Replace bincode dev-dependency with postcard

bincode is flagged as unmaintained by [RUSTSEC-2025-0141](https://rustsec.org/advisories/RUSTSEC-2025-0141), and the advisory covers the entire crate with no patched version available. The only use in `rustdoc-json-types` was the binary serde roundtrip in the type tests.

[postcard](https://crates.io/crates/postcard) is a maintained serde-based binary serialization format that covers the same roundtrip testing need.

bincode is still pulled in transitively by the miri subtree (via `ipc-channel`), which needs to be [addressed upstream](rust-lang/miri#5115).

### Related

- rust-lang/miri#5115
aDotInTheVoid added a commit to aDotInTheVoid/rustdoc-types-contrib that referenced this pull request Jun 18, 2026
github-actions Bot pushed a commit to rust-lang/stdarch that referenced this pull request Jun 19, 2026
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#156795 (Handle generic reborrow in expression-use adjustment walking)
 - rust-lang/rust#157694 (Enhance documentation on wake call memory ordering)
 - rust-lang/rust#157935 (Make `proc_macro::ConversionErrorKind` non exhaustive)
 - rust-lang/rust#158002 (Replace `unwrap` with `expect` in `get_module_children`)
 - rust-lang/rust#158009 (Reject `impl const Trait` since the right syntax is `const impl Trait` now)
 - rust-lang/rust#158034 (Fix reborrow source expression visits)
 - rust-lang/rust#158072 (Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103)
 - rust-lang/rust#158074 (Document transient connection errors from TcpListener::accept)
 - rust-lang/rust#158077 (rustdoc-json-types: Replace bincode dev-dependency with postcard)
 - rust-lang/rust#158086 (renovate: Loosen dashboard approval and adopt recommended config)
 - rust-lang/rust#158088 (codegen_ssa: no dbginfo for scalable vec local w/ `-O0`)
 - rust-lang/rust#158089 (Fix invalid "jump-to-def" doc link generation when an item has a `derive` proc-macro)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants