Skip to content

oci: Switch to tar-core crate with sans-IO Parser#249

Merged
cgwalters merged 1 commit intocomposefs:mainfrom
cgwalters:tar-core
Mar 10, 2026
Merged

oci: Switch to tar-core crate with sans-IO Parser#249
cgwalters merged 1 commit intocomposefs:mainfrom
cgwalters:tar-core

Conversation

@cgwalters
Copy link
Copy Markdown
Collaborator

@cgwalters cgwalters commented Mar 6, 2026

This depends on #248

Working on direct import from containers-storage: I hit on
the fact that our tar parsing was very hand-rolled and incomplete.
We didn't handle PAX overrides correctly, there was a big `todo!`
for global headers where we'd panic, etc.

Recently I did a new tar-core crate which is now part of
the composefs org - it's "sans-io" so works cleanly
with both sync and async parsing.

Update the code to use it.

The tar crate is retained as a dev-dependency for tar::Builder in
tests.

Assisted-by: OpenCode (Claude claude-opus-4-6)
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters marked this pull request as ready for review March 9, 2026 17:18
@cgwalters cgwalters enabled auto-merge (rebase) March 9, 2026 17:18
@cgwalters
Copy link
Copy Markdown
Collaborator Author

After looking at this one again I remembered that I'd seen widespread usage of Bytes in the async ecosystem, and indeed rebasing the logic using that is a lot cleaner.

Copy link
Copy Markdown
Collaborator

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cgwalters cgwalters merged commit 6503023 into composefs:main Mar 10, 2026
16 of 18 checks passed
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