Add repr(c) for SplitStream header structs#266
Merged
cgwalters merged 1 commit intocomposefs:mainfrom Mar 17, 2026
Merged
Conversation
While trying out composefs#263 locally, I found that Rust is rearranging the SplitStreamHeader struct's fields to the following ``` [32, 0, 0, 0, 0, 0, 0, 0, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 112, 108, 105, 116, 83, 116, 114, 101, 97, 109, 0, 2, 12] ``` The first two U64 are the start and end of the field `info` when `info` is the last field in the struct; then comes the flags which is the third field... We probably don't want this undeterministic behaviour, which might also change from arch to arch Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Collaborator
Author
|
This has the very unfortunate effect of breaking any previously created repos |
Collaborator
Yes...though... per https://docs.rs/zerocopy/latest/zerocopy/derive.IntoBytes.html while we clearly should have been using |
Collaborator
|
OK I think #263 is also format breaking (will verify). My 2c is let's change bootc to detect this case and fall back to re-fetching the image? |
Collaborator
|
I also have a pending PR for #181 so basically - detect meta.json and if not fall back to re-fetch? |
cgwalters
approved these changes
Mar 17, 2026
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.
While trying out #263 locally, I found that Rust is rearranging the SplitStreamHeader struct's fields to the following
The first two U64 are the start and end of the field
infowheninfois the last field in the struct; then comes the flags which is the third field...We probably don't want this undeterministic behaviour, which might also change from arch to arch