Skip to content

feat: Add bytemuck crate support for Pod types - #49

Merged
Altair-Bueno merged 9 commits into
Altair-Bueno:masterfrom
williamwutq:bytemuck
Sep 7, 2026
Merged

feat: Add bytemuck crate support for Pod types#49
Altair-Bueno merged 9 commits into
Altair-Bueno:masterfrom
williamwutq:bytemuck

Conversation

@williamwutq

@williamwutq williamwutq commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Wanting to use something for serialization and this crate looks great. As a bytemuck user, it would be nice to have some bytemuck integration, so I hope this PR can bring it to this crate.

@williamwutq williamwutq changed the title feat: Add bytemuch crate support for Pod types feat: Add bytemuck crate support for Pod types Sep 4, 2026
Comment thread src/combinators/pod.rs Outdated
Comment thread src/combinators/pod.rs Outdated
Comment thread CHANGELOG.md Outdated
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7fe1c1f) to head (88b2139).

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #49   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        26    +1     
  Lines         1025      1068   +43     
=========================================
+ Hits          1025      1068   +43     
Files with missing lines Coverage Δ
src/combinators/pod.rs 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@williamwutq

Copy link
Copy Markdown
Contributor Author

See my reply to your comment @Altair-Bueno. Currently on this branch, on be machines, BE of Pod implements Encodable, and on le machines, LE of Pod implements Encodable, as there is no canonical way to reverse the endianness of a Pod struct. Since no unsafe code is allowed, #[cfg(...)] unsafe impl Encodable for Pod cannot happen, using LE and BE is rather explicit and correct. The BE implementation is checked with cargo check --target s390x-unknown-linux-gnu and compiles

@williamwutq

Copy link
Copy Markdown
Contributor Author

@Altair-Bueno Changed according to your intention (plan 2 with native endian order, documented). Please do another review. Thanks

Altair-Bueno and others added 3 commits September 8, 2026 00:46
The bytemuck bullet exceeded prettier's `proseWrap: always` width, failing
the prettier-fmt job. Also keeps the feature and dependency entries
alphabetically sorted alongside `arrayvec` and `bytes`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Point users at the LE/BE combinators when a stable wire format is needed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Altair-Bueno
Altair-Bueno merged commit e731b12 into Altair-Bueno:master Sep 7, 2026
56 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 7, 2026
@williamwutq
williamwutq deleted the bytemuck branch September 7, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants