Build postcard without its default features (drops heapless / atomic-polyfill, RUSTSEC-2023-0089) - #111
Open
alexandru-diaconu wants to merge 1 commit into
Conversation
Only postcard::from_bytes is used at runtime (src/metadata/database.rs), and build.rs only needs use-std. postcard's default feature `heapless-cas` pulls in heapless 0.7, which depends on atomic-polyfill, flagged unmaintained by RUSTSEC-2023-0089. Every downstream `cargo audit` / `cargo deny` then reports it, although nothing here uses heapless. With default-features = false the full test suite passes unchanged and neither heapless nor atomic-polyfill remains in the dependency graph. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
postcard's default featureheapless-caspulls inheapless0.7, which depends onatomic-polyfill, flagged as unmaintained by RUSTSEC-2023-0089. So every downstreamcargo audit/cargo denyrun reports it, although this crate never usesheapless.The crate only needs
postcard::from_bytesat runtime (src/metadata/database.rs) andto_iowithuse-stdinbuild.rs. This PR turns the default features off in both places:[dependencies]:postcard = { version = "1.1", default-features = false }[build-dependencies]:postcard = { version = "1.1", default-features = false, features = ["use-std"] }Verified:
main,cargo testpasses unchanged: 90 unit tests, plus the doc and integration tests.cargo tree -i heaplessandcargo tree -i atomic-polyfillnow match no package.Thanks for maintaining this crate.
🤖 Generated with Claude Code