Skip to content

Commit

Permalink
Switch to the zlib flate2 backend
Browse files Browse the repository at this point in the history
The default `miniz_oxide` flate2 backend has poor performance in debug/under QEMU:
rust-lang/flate2-rs#297

Ideally we'd use the fastest `zlib-ng` backend, however it fails to cross-compile:
rust-lang/libz-sys#93

As such we have to use the next best alternate backend, which is `zlib`.

This makes the `flate2` usage in this repo consistent with `libherokubuildpack`,
Python CNB, PHP CNB etc.
  • Loading branch information
edmorley committed Mar 1, 2024
1 parent bf86694 commit 99013ae
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion buildpacks/ruby/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ workspace = true
[dependencies]
clap = { version = "4", default-features = false, features = ["derive", "error-context", "help", "std", "usage"] }
commons = { path = "../../commons" }
flate2 = "1"
flate2 = { version = "1", default-features = false, features = ["zlib"] }
fs-err = "2"
fun_run = { version = "0.1", features = ["which_problem"] }
glob = "0.3"
Expand Down

0 comments on commit 99013ae

Please sign in to comment.