Skip to content

Tweak Builder APIs - #93

Merged
woodruffw merged 5 commits into
mainfrom
ww/builder-apis
Jun 25, 2026
Merged

Tweak Builder APIs#93
woodruffw merged 5 commits into
mainfrom
ww/builder-apis

Conversation

@woodruffw

Copy link
Copy Markdown
Member

This tweaks our Builder APIs (on top of ArchiveBuilder) in two ways that make downstream use in uv possible:

  • add_entry is now add_file, and it takes an EntryPayload instead of a pre-allocated byte slice. EntryPayload in turn can be constructed from a slice, from an async reader, etc.
  • add_directory is renamed to add_directory_all
  • The new add_directory only adds a directory entry without any actual recursion/filesystem access whatsoever.

Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
Now that FilePayload is constructable
through public APIs, we need to make sure a user
doesn't create one, call `next_chunk`, and then
pass it to us in a partial state.

Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
@woodruffw
woodruffw marked this pull request as ready for review June 25, 2026 17:11
Signed-off-by: William Woodruff <william@yossarian.net>
@woodruffw
woodruffw merged commit 69af132 into main Jun 25, 2026
5 checks passed
@woodruffw
woodruffw deleted the ww/builder-apis branch June 25, 2026 17:24
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.

1 participant