fix: resolve zstd-sys compilation issues with zig cross-compilation (#203)

- Update to mlugg/setup-zig@v2 for better stability and features
- Use Zig 0.13.0 for improved musl target support
- Add system zstd libraries (libzstd-dev, zstd) to Ubuntu dependencies
- Configure environment variables for zstd-sys to use pkg-config
- Enable pkg-config feature for zstd dependency to prefer system library
- Add proper C/C++ compiler configuration for musl targets

Fixes the 'error: unable to parse target query x86_64-unknown-linux-musl: UnknownOperatingSystem'
compilation error in zstd-sys during cross-compilation.
This commit is contained in:
安正超
2025-07-14 20:01:52 +08:00
committed by GitHub
parent 63b79ae151
commit ccad91a4a9
4 changed files with 33 additions and 3 deletions
+1 -1
View File
@@ -265,7 +265,7 @@ wildmatch = { version = "2.4.0", features = ["serde"] }
winapi = { version = "0.3.9" }
xxhash-rust = { version = "0.8.15", features = ["xxh64", "xxh3"] }
zip = "2.4.2"
zstd = "0.13.3"
zstd = { version = "0.13.3", features = ["pkg-config"] }
anyhow = "1.0.98"
[profile.wasm-dev]