Skip to content

Conversation

@Boshen
Copy link
Collaborator

@Boshen Boshen commented Nov 5, 2025

Reason for change:

error[E0433]: failed to resolve: use of unresolved module or unlinked crate `std`
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/simd-adler32-0.3.7/src/imp/wasm.rs:146:34
    |
146 |     let arr: [u32; 4] = unsafe { std::mem::transmute(v) };
    |                                  ^^^ use of unresolved module or unlinked crate `std`
    |
    = help: if you wanted to use a crate named `std`, use `cargo add std` to add it to your `Cargo.toml`
help: consider importing this module
    |
 27 +   use core::mem;
    |
help: if you import `mem`, refer to it directly
    |
146 -     let arr: [u32; 4] = unsafe { std::mem::transmute(v) };
146 +     let arr: [u32; 4] = unsafe { mem::transmute(v) };
    |

Reason for change:

* unify deflate usage across our tools
  * consistent behaviour
  * reduce compilation size
* reason for switching from miniz_oxide to zlib-rs:
  * flate2 uses simd-adler32 https://github.com/rust-lang/flate2-rs/releases/tag/1.1.3
  * simd-adler32 breaks on wasm:

```
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `std`
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/simd-adler32-0.3.7/src/imp/wasm.rs:146:34
    |
146 |     let arr: [u32; 4] = unsafe { std::mem::transmute(v) };
    |                                  ^^^ use of unresolved module or unlinked crate `std`
    |
    = help: if you wanted to use a crate named `std`, use `cargo add std` to add it to your `Cargo.toml`
help: consider importing this module
    |
 27 +   use core::mem;
    |
help: if you import `mem`, refer to it directly
    |
146 -     let arr: [u32; 4] = unsafe { std::mem::transmute(v) };
146 +     let arr: [u32; 4] = unsafe { mem::transmute(v) };
    |

```
@Boshen Boshen force-pushed the 11-05-refactor_change_miniz_oxide_to_flate2_with_zlib-rs_backend branch from 4c0b1c6 to f3fbf2e Compare November 5, 2025 06:46
@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

Benchmark for c667375

Click to view benchmark
Test Base PR %
vpath_edge_cases 2.1±0.06µs 2.2±0.07µs +4.76%
vpath_mixed_workload 4.4±0.20µs 4.6±0.10µs +4.55%
vpath_native 1353.9±64.18ns 1380.0±66.56ns +1.93%
vpath_virtual 3.3±0.13µs 3.4±0.16µs +3.03%
vpath_virtual_zip 2.7±0.08µs 2.9±0.09µs +7.41%
vpath_zip 1828.8±66.98ns 1875.8±62.50ns +2.57%

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

Benchmark for ad7cec1

Click to view benchmark
Test Base PR %
vpath_edge_cases 2.0±0.07µs 2.1±0.04µs +5.00%
vpath_mixed_workload 4.2±0.19µs 4.2±0.11µs 0.00%
vpath_native 1310.5±45.20ns 1329.3±49.56ns +1.43%
vpath_virtual 3.2±0.06µs 3.3±0.12µs +3.12%
vpath_virtual_zip 2.7±0.09µs 2.8±0.07µs +3.70%
vpath_zip 1794.1±50.22ns 1824.3±48.77ns +1.68%

@Boshen Boshen merged commit 868b5bf into main Nov 5, 2025
6 checks passed
@Boshen Boshen deleted the 11-05-refactor_change_miniz_oxide_to_flate2_with_zlib-rs_backend branch November 5, 2025 06:53
@github-actions github-actions bot mentioned this pull request Nov 5, 2025
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