Skip to content

chore: migrate Zlib and Bzip2 to pure Rust implementations (#948)#967

Open
tommady wants to merge 3 commits intoouch-org:mainfrom
tommady:close-issue-948
Open

chore: migrate Zlib and Bzip2 to pure Rust implementations (#948)#967
tommady wants to merge 3 commits intoouch-org:mainfrom
tommady:close-issue-948

Conversation

@tommady
Copy link
Copy Markdown
Collaborator

@tommady tommady commented Apr 29, 2026

close #948

)

Signed-off-by: tommady <tommady@users.noreply.github.com>
@tommady
Copy link
Copy Markdown
Collaborator Author

tommady commented Apr 29, 2026

hey @marcospb19
please help review while you have time.
thanks~

@valoq
Copy link
Copy Markdown
Collaborator

valoq commented Apr 30, 2026

Please also set
gzp = { version = "2.0.1", default-features = false, features = ["snappy_default"] }
without it gzp's defaults still pull in libz-ng-sys and libdeflater (both C), and flate2 picks zlib-ng over zlib-rs at runtime, so the C zlib stays and #948 isn't actually closed. We should also drop libbz2 and libz from the README runtime-deps list

@valoq valoq mentioned this pull request Apr 30, 2026
tommady added 2 commits May 1, 2026 06:30
Signed-off-by: tommady <tommady@users.noreply.github.com>
Signed-off-by: tommady <tommady@users.noreply.github.com>
@tommady
Copy link
Copy Markdown
Collaborator Author

tommady commented May 1, 2026

Please also set gzp = { version = "2.0.1", default-features = false, features = ["snappy_default"] } without it gzp's defaults still pull in libz-ng-sys and libdeflater (both C), and flate2 picks zlib-ng over zlib-rs at runtime, so the C zlib stays and #948 isn't actually closed. We should also drop libbz2 and libz from the README runtime-deps list

Thanks for catching that!

Additionally, I've entirely removed the "Runtime Dependencies" section from the README.md.

Since we are now using pure Rust implementations for zlib and bzip2, and bzip3 is statically linked via the bundled feature (bzip3 = { ..., features = ["bundled"] }), users will no longer need any of those C libraries installed on their systems at runtime regardless of whether they are using the musl build or not!

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.

Using Rust Implementations for Zlib and Bzip2

2 participants