cloudflare / cloudflare/pingora

Add way to swap Flate2 feature zlib-ng => zlib-rs

Open
#704 2 comments 3 reactions 0 assignees View on GitHub
dependencies
Dominant language
Rust
Stars
27.4k
Forks
1.7k
Avg merge
6h 22m
Merged PRs (30d)
3

Description

## What is the problem your feature solves, or the need it fulfills?

Compiling Flate2 with the zlib-ng feature on Windows fails with the error:
error: could not find native static library 'zlibstatic-ngd'.
Switching to zlib-rs resolves this issue.

## Describe the solution you'd like

I'd like a feature or configuration option in Pingora that activates the zlib-rs feature in the flate2 crate instead of zlib-ng.

## Describe alternatives you've considered

- Using the 'miniz_oxide': default backend would work as well.
- Help me patch out 'zlib-ng': I swear I've tried but it won't work 😭, a less involved solution would be preferred.
- Manually building zlib-ng and linking with -L Rustflags: This is what I've been doing, but it's not ideal for CI or our cross platform builds.

## Additional Context

My primary concern is making the Windows build succeed. The zlib-ng feature in flate2 causes build failures due to missing native libraries. Switching to zlib-rs resolves this, and I'd love to see Pingora support that path more directly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.