alexcrichton / curl-rust

Rust bindings to libcurl
MIT License
1k stars 234 forks source link

Make zlib optional #480

Closed zengxs closed 6 months ago

zengxs commented 1 year ago

Add zlib feature for make it possible to disable zlib.

alexcrichton commented 1 year ago

Thanks! Can you update CI to test this as well?

zengxs commented 1 year ago

@alexcrichton

I added unit tests for these cases: no-zlib, zlib, zlib-ng. But the build of zlib-ng break ci, so I tried to introduce a step in run.sh to install cmake to solve this. (Old cmake broke build, so I didn't install cmake via apt/yum)

After hours for test and 10+ commits, CI is finally working. (It's such a pain to fight with github ci compile environment.)

Can you see if the current changes meet our needs?

zengxs commented 1 year ago

@alexcrichton For historical compatibility, I set static-curl to enable zlib by default, and added a new feature static-curl-no-zlib to disable zlib.