diff --git a/Cargo.lock b/Cargo.lock index 1b116bd37..47a552838 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -127,6 +127,15 @@ dependencies = [ "num-traits", ] +[[package]] +name = "arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" +dependencies = [ + "derive_arbitrary", +] + [[package]] name = "asn1-rs" version = "0.7.1" @@ -516,7 +525,8 @@ dependencies = [ "wstd", "x509-parser", "zeroize", - "zip", + "zip 6.0.0", + "zip 7.0.0", ] [[package]] @@ -1078,6 +1088,17 @@ dependencies = [ "serde_core", ] +[[package]] +name = "derive_arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + [[package]] name = "difflib" version = "0.4.0" @@ -4473,12 +4494,6 @@ version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" -[[package]] -name = "typed-path" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7922f2cdc51280d47b491af9eafc41eb0cdab85eabcb390c854412fcbf26dbe8" - [[package]] name = "typenum" version = "1.19.0" @@ -5249,14 +5264,26 @@ dependencies = [ [[package]] name = "zip" -version = "7.2.0" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b" +dependencies = [ + "arbitrary", + "crc32fast", + "indexmap 2.13.0", + "memchr", +] + +[[package]] +name = "zip" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42e33efc22a0650c311c2ef19115ce232583abbe80850bc8b66509ebef02de0" +checksum = "bdd8a47718a4ee5fe78e07667cd36f3de80e7c2bfe727c7074245ffc7303c037" dependencies = [ + "arbitrary", "crc32fast", "indexmap 2.13.0", "memchr", - "typed-path", ] [[package]] diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index e0a15e8b1..9b03933b4 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -183,7 +183,6 @@ uuid = { version = "1.18.0", features = ["serde", "v4"] } web-time = "1.1" x509-parser = "0.18.0" zeroize = { version = "1.8", features = ["zeroize_derive"] } -zip = { version = "7.0.0", default-features = false } # Use the asm feature of sha2 on aarch64 macOS for better performance. This nearly # halves hashing time for large assets (> 50gb mp4, for example). @@ -199,6 +198,7 @@ sha2 = "0.10.6" sha2 = { version = "0.10.6", features = ["asm"] } [target.'cfg(not(target_os = "wasi"))'.dependencies] +zip = { version = "7.0", default-features = false } reqwest = { version = "0.12.23", default-features = false, features = [ # These are some of the defaults in `reqwest`. "http2", @@ -213,6 +213,13 @@ ureq = { version = "3.1.0", default-features = false, features = [ ], optional = true } [target.'cfg(target_os = "wasi")'.dependencies] +# TODO: Keep zip crate pinned until typed-path works on WASI. +# See https://github.com/contentauth/c2pa-rs/issues/1759 and +# http://github.com/chipsenkbeil/typed-path/pull/57. +# Zip 7.x adds a dependency on typed-path 0.12.0 which doesn't compile on WASI, +# so pin to 6.x here. +zip = { version = "6.0", default-features = false } + wasi = { version = "0.14.3", optional = true } wstd = { version = "0.5.4", optional = true }