#1110486 fails to match API of zstd 1.5.7 (matches 1.5.6)

#1110486#5
Date:
2025-08-06 20:22:34 UTC
From:
To:
The Rust crate v7.2.1 covers the API of C library libzstd 1.5.6, but
fails to cover the API of libstds 1.5.7.

Building a project depending on rust-zstd-safe fails like this:

error[E0433]: failed to resolve: could not find `ZSTD_paramSwitch_e` in `zstd_sys`
    --> /build/atomic-data-rust-0.40.0+ds/debian/cargo_registry/zstd-safe-7.2.1/src/lib.rs:2081:22
     |
2081 |     Auto = zstd_sys::ZSTD_paramSwitch_e::ZSTD_ps_auto as u32,
     |                      ^^^^^^^^^^^^^^^^^^
     |                      |
     |                      could not find `ZSTD_paramSwitch_e` in `zstd_sys`
     |                      help: an enum with a similar name exists: `ZSTD_ParamSwitch_e`

error[E0433]: failed to resolve: could not find `ZSTD_paramSwitch_e` in `zstd_sys`
    --> /build/atomic-data-rust-0.40.0+ds/debian/cargo_registry/zstd-safe-7.2.1/src/lib.rs:2082:24
     |
2082 |     Enable = zstd_sys::ZSTD_paramSwitch_e::ZSTD_ps_enable as u32,
     |                        ^^^^^^^^^^^^^^^^^^
     |                        |
     |                        could not find `ZSTD_paramSwitch_e` in `zstd_sys`
     |                        help: an enum with a similar name exists: `ZSTD_ParamSwitch_e`

error[E0433]: failed to resolve: could not find `ZSTD_paramSwitch_e` in `zstd_sys`
    --> /build/atomic-data-rust-0.40.0+ds/debian/cargo_registry/zstd-safe-7.2.1/src/lib.rs:2083:25
     |
2083 |     Disable = zstd_sys::ZSTD_paramSwitch_e::ZSTD_ps_disable as u32,
     |                         ^^^^^^^^^^^^^^^^^^
     |                         |
     |                         could not find `ZSTD_paramSwitch_e` in `zstd_sys`
     |                         help: an enum with a similar name exists: `ZSTD_ParamSwitch_e`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `zstd-safe` (lib) due to 3 previous errors

Upstream has fixed this in https://github.com/gyscos/zstd-rs/pull/324
which was included with crate v7.2.3.

 - Jonas
-----BEGIN PGP SIGNATURE-----

wsG7BAEBCgBvBYJok7mHCRAsfDFGwaABIUcUAAAAAAAeACBzYWx0QG5vdGF0aW9u
cy5zZXF1b2lhLXBncC5vcmd0m1h02Kpiq1v9lN/nwDuV+/Qi+1TyBT+QSXlAPvsm
VBYhBJ/j6cNmkaaf9TzGhCx8MUbBoAEhAADXLg//cd70bZUgM/80cKJrxiv5Vncj
s5qkoM+6ih2hWb2cjTmCKsbDddPUBH2owlQlZFr/iMC8shVhzUQ/04wqYIhBSMQw
ljLbXGSbTGtZrRDSZVEoxzLr0LyczvgSn+j2lYLWgspqNkx+6osT02KGJdxVWMAs
QKbBoeIZBgq8TXM6XxwbVHevY8Ornx9invkLUVespYjznO2rdaGLNrYLfB9qpQR2
keGECdJRtXtC2D2oLNYjPtDRqUsrc4adYNiOkvU+Z2ZxFwSPbzyi96qBZiO0id6D
HmI9MFKsPY0F1rX9RJqoPtmAbNc9m+GgISGVA1gMmsmtUrNmsL3FZ5IIlpgVzFLU
2WrauyYfUQ4FKtqeyIlfPit7/TstFIltyDtzQMPCipexYq90j0z0JyT6rpQUpecr
eT4Y6PVa/tlSwzFPNnohY78YxyUWAvTlCwGg2sLEkzCd2RRaBwPtdU/v8cnQ40fR
+LRDaGOAfQkPnTo6VKVb0ajcGCyYlW/PHi8cLITeLKj6SbqY0kL9OWv4cBsRjgql
py9Fc/mpgEhJKKDgr06L/04HzAaRBxHiPQ1iBYf3QTklaxoxF4wbkS7AHAzC52ya
+KDeGAdEstFctapy6tvYz7UJ6aE3ffzp33eGm5yZN1ydFlC2HdckT2RSS4TRenRT
ob4ys7mfr8RHYpAohYs=
=9Bj1
-----END PGP SIGNATURE-----

#1110486#10
Date:
2025-08-06 20:48:04 UTC
From:
To:
Quoting Jonas Smedegaard (2025-08-06 22:22:34)

The failure occurs when building with the feature "experimental".

The package does not run the upstream testsuite during build, and
although they are run in debci (i.a. autopkgtests), failures are
ignored - and indeed the test for the feature "experimental" fails,
seeen e.g. at
https://ci.debian.net/packages/r/rust-zstd-safe/unstable/amd64/61950817/#L9091

 - Jonas