rusty_zlib 0.1.2

Remade-With-Rust fork of zlib-rs: a memory-safe, pure-Rust zlib (deflate/inflate, zlib and gzip), measured and tuned for the MATA stack
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! House CI gate: assert which SIMD path this build reaches.
//!
//! Set `RUSTY_ZLIB_EXPECT_SIMD` (for example `avx2`) to make this fail when the build lands on
//! a narrower path. The point is to catch a feature combination, such as `default-features =
//! false` without `std`, that silently falls back to scalar code. Unset, it only prints the path.

#[test]
fn reaches_expected_simd_path() {
    let reached = rusty_zlib::simd_path();
    eprintln!("rusty_zlib SIMD path: {reached}");
    if let Ok(expected) = std::env::var("RUSTY_ZLIB_EXPECT_SIMD") {
        assert_eq!(
            reached, expected,
            "this build does not reach the expected SIMD path"
        );
    }
}