Re: [Pkg-rust-maintainers] Upcoming switches to zlib-rs
On Sun, Apr 27, 2025, at 8:29 PM, Josh Triplett wrote:
> [Ccing Folkert, one of the upstream maintainers of zlib-rs.]
switching the Debian Rust list over to the discussion one which sees
less traffic and is more likely to be actively read :)
> Several upstream Rust crates are switching to zlib-rs, including cargo,
> rustup, and gitoxide. I wanted to give you as much advance notice as
> possible, since it looks like zlib-rs isn't packaged in Debian yet. (I'd
> expect it to be relatively easy to package; it shouldn't have any
> unusual requirements compared to other Rust crates.) This will also
> require flate2 1.1.1.
better late than never - zlib-rs (and libz-rs-sys and libz-rs-sys-cdylib)
are waiting for review in the Debian NEW queue :)
> This came about because zlib-rs 0.5.0 made a change to no longer export
> the C zlib symbols by default, so using zlib-rs no longer requires
> carefully making sure that nothing else in the address space uses a
> different zlib library; there won't be any symbol conflicts.
related - since the initial upload is just going to experimental anyway,
this can easily be changed still. is there any upstream guidance about
packaging the cdylib w.r.t. prefixing symbols or not? are there prominent
non-Rust projects using zlib-rs already that might have a preference?
I opted for shipping it unprefixed for now, with the headers in a separate
dir (since they should be compatible anyway that likely makes no difference).
it should be possible to use the resulting library as a drop-in replacement,
but it means not being able to mix libz and libz_rs in a single project.
> I would not expect this to become an issue until after the upcoming
> stable release. (It'll come up for new versions of rustc-web, though.)
it's not an issue for rustc(-web or not) since those packages vendor
their Rust dependencies.
> Hopefully this will go smoothly; please reach out if there are any
> issues.
thanks for reaching out/the heads up, and sorry for the delay in
getting back and handling it!
Fabian
Reply to: