clux / muslrust

Docker environment for building musl based static linux rust binaries
MIT License
931 stars 87 forks source link

Add zlib-ng? #107

Open bjornharrtell opened 1 year ago

bjornharrtell commented 1 year ago

Feature request :)

clux commented 1 year ago

zlib-ng does seem like a reasonable drop-in replacement - provided it can indeed be made to work for the other consumers of it (i.e. curl and openssl - libpq currently doesn't even compile with zlib..).

Long term I am kind of hoping to have less C dependencies here because of maintenance required, but that requires rustls to iron out some of their last production limiting issues so that means at least some years more of maintaining openssl here.

So.. maybe? I don't really know what benefits this would entail for users of a docker image? I honestly wasn't expecting much movement on zlib at this point, so there probably would have to be some good performance benefits for it to be worth the maintenance overhead.

bjornharrtell commented 1 year ago

Unfortunately the pure rust impl performs worse than both the classic c zlib and zlib-ng is significatly faster than zlib.

clux commented 1 year ago

Do you know of any benchmarks around to look at?

bjornharrtell commented 1 year ago

There are bits and pieces around, fx. https://github.com/Frommi/miniz_oxide/issues/5. But I see there is stuff like https://lib.rs/crates/simd-adler32.. but seems it is not easily opted in.