FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Switch to libz-rs-sys for zlib implementation by coolreader18 · Pull Request #5562 · RustPython/RustPython · GitHub

Switch to libz-rs-sys for zlib implementation - #5562

Merged
coolreader18 merged 1 commit into
RustPython:mainfrom
coolreader18:zlib-rs
Feb 26, 2025
Merged

Switch to libz-rs-sys for zlib implementation#5562
coolreader18 merged 1 commit into
RustPython:mainfrom
coolreader18:zlib-rs

Conversation

Copy link
Copy Markdown
Member

This is a rust-only reimplementation of the libz-sys api, which I discovered from this blog post. It can build without any C toolchain, which makes it a good pick for us when we're targeting windows and wasm, and the performance isn't anything to scoff at (see blog post). Also, the zlib feature now enables the entire zlib module, which I feel like just makes more sense.

Copy link
Copy Markdown
Member

if it is a pure rust implementation, do we still need a zlib feature?

Copy link
Copy Markdown
Member Author

It's a reasonably heavy dependency (~500KB), so I figured it might be nice to still have the option to turn it off.

Copy link
Copy Markdown
Member

We don't suggest feature for every library which can be a redundant dependencies. If the binary size matters, turning off the entire stdlib feature and consist their own well-selected (or we can suggest a few pre-selected) set of libraries will make more sense.

Copy link
Copy Markdown
Member Author

Fair enough.

coolreader18 force-pushed the zlib-rs branch 2 times, most recently from 6e740d9 to 3887f7c Compare February 26, 2025 02:55

youknowone commented Feb 26, 2025
edited
Loading

Copy link
Copy Markdown
Member

Probably we can remove zlib feature from rustpython crate but add a lot of features for each library in rustpython-stdlib as a user interface to support easy library on/off. (not a scope of this pr)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL