Skip to content

Conversation

mhx
Copy link
Contributor

@mhx mhx commented Aug 6, 2025

The inline docs for folly::Bits already mention that storage is expected to be little-endian. This change enforces little-endianness by using folly::Endian for load/store operations. This should be a no-op on little-endian systems.

The main motivation for this change is that it immediately enables fbthrift Frozen2 files to be exchanged between little- and big-endian systems.

@meta-cla meta-cla bot added the CLA Signed label Aug 6, 2025
The inline docs for `folly::Bits` already mention that storage is expected
to be little-endian. This change enforces little-endianness by using
`folly::Endian` for load/store operations. This should be a no-op on
little-endian systems.

The main motivation for this change is that it immediately enables
fbthrift Frozen2 files to be exchanged between little- and big-endian
systems.
@mhx mhx force-pushed the mhx/bits-force-little-endian branch from 23aa467 to 3166f8b Compare August 12, 2025 08:42
@mhx
Copy link
Contributor Author

mhx commented Aug 12, 2025

Updated to simplify the change and leave the BitsTraits untouched. Also fixed the unit tests on big-endian systems, which were previously broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant