diff --git a/Cargo.lock b/Cargo.lock index 1255535c..c488fe9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -123,6 +123,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "brotli" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor 2.5.1", +] + [[package]] name = "brotli" version = "6.0.0" @@ -131,7 +142,17 @@ checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", - "brotli-decompressor", + "brotli-decompressor 4.0.0", +] + +[[package]] +name = "brotli-decompressor" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", ] [[package]] @@ -633,6 +654,16 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" version = "0.4.20" @@ -714,6 +745,29 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "parking_lot" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.0", +] + [[package]] name = "pkcs8" version = "0.10.2" @@ -874,6 +928,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.4.1", +] + [[package]] name = "regex" version = "1.10.2" @@ -940,6 +1003,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + [[package]] name = "semver" version = "1.0.21" @@ -997,6 +1066,12 @@ dependencies = [ "rand_core", ] +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + [[package]] name = "snap" version = "1.1.1" @@ -1170,12 +1245,29 @@ dependencies = [ "subtle", ] +[[package]] +name = "vach" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36952a168221690ab9adc1dd46a7fb650449632f262d1fa86e4baed865eb7dc" +dependencies = [ + "aes-gcm", + "brotli 3.5.0", + "ed25519-dalek", + "lz4_flex", + "parking_lot", + "rand", + "rayon", + "snap", + "thiserror", +] + [[package]] name = "vach" version = "0.6.0" dependencies = [ "aes-gcm", - "brotli", + "brotli 6.0.0", "ed25519-dalek", "lz4_flex", "rand", @@ -1189,7 +1281,7 @@ name = "vach-benchmarks" version = "0.1.0" dependencies = [ "criterion", - "vach", + "vach 0.6.0", ] [[package]] @@ -1202,7 +1294,7 @@ dependencies = [ "num_cpus", "tabled", "term_size", - "vach", + "vach 0.5.5", "walkdir", ] diff --git a/vach-cli/Cargo.toml b/vach-cli/Cargo.toml index dec87ac3..61d651d6 100644 --- a/vach-cli/Cargo.toml +++ b/vach-cli/Cargo.toml @@ -19,7 +19,7 @@ name = "vach" path = "src/main.rs" [dependencies] -vach = { path = "../vach", features = ["all"] } +vach = { version = "0.6", features = ["all"] } num_cpus = "1.16.0" clap = "3.1.15" indicatif = "0.17.8" diff --git a/vach-cli/src/commands/pack.rs b/vach-cli/src/commands/pack.rs index 012465b4..1c77780c 100644 --- a/vach-cli/src/commands/pack.rs +++ b/vach-cli/src/commands/pack.rs @@ -209,6 +209,7 @@ impl CommandTrait for Evaluator { .map(|v| v.parse::().ok()) .flatten() .unwrap_or(num_cpus::get()); + let builder_config = BuilderConfig { flags, magic, diff --git a/vach-cli/src/keys/mod.rs b/vach-cli/src/keys/mod.rs index f75a142b..7999d77c 100644 --- a/vach-cli/src/keys/mod.rs +++ b/vach-cli/src/keys/mod.rs @@ -42,7 +42,7 @@ pub fn build_keys<'a>() -> HashMap<&'static str, Arg<'a>> { .short('j') .long("jobs") .value_name(key_names::JOBS) - .help("How many threads to spawn during archive processing, defaults to current number of threads") + .help("How many threads to spawn during archive processing, defaults to number of threads on system") .required(false) .takes_value(true) .number_of_values(1), diff --git a/vach-cli/test_data/test.sh b/vach-cli/test_data/test.sh index 3b3ff1c9..7a0d9318 100755 --- a/vach-cli/test_data/test.sh +++ b/vach-cli/test_data/test.sh @@ -5,7 +5,7 @@ set -xe # # Variables EXCLUDE=test.sh ARTIFACTS="keypair.sk keypair.pk keypair.kp signed.vach custom.vach encrypted.vach" -VACH="cargo run --release --" +CMD="cargo run -q --release --" # # Delete any previous artifacts rm -f $ARTIFACTS @@ -17,22 +17,22 @@ echo "Starting vach-cli tests..." cargo build --release # # Create simple archive with simple input, no compression only signatures -$VACH pack --output signed.vach --directory-r ./ --compress-mode detect --compress-algo brotli --hash --exclude $EXCLUDE +$CMD pack --output signed.vach --directory-r ./ --compress-mode detect --compress-algo brotli --hash --exclude $EXCLUDE # # Split the resulting keypair -$VACH split -i keypair.kp -$VACH list -i signed.vach +$CMD split -i keypair.kp +$CMD list -i signed.vach # # Generate a compressed archive with custom magic -$VACH pack -o custom.vach -m CSTOM -i GamerProfile.xml -x $EXCLUDE -$VACH list -i custom.vach -m CSTOM +$CMD pack -o custom.vach -m CSTOM -i GamerProfile.xml -x $EXCLUDE +$CMD list -i custom.vach -m CSTOM # # Generate an encrypted, signed and compressed archive -$VACH pack -o encrypted.vach -d lolcalt -ea -c always -s keypair.sk -$VACH list -i encrypted.vach +$CMD pack -o encrypted.vach -d lolcalt -ea -c always -s keypair.sk +$CMD list -i encrypted.vach # Unpack the encrypted archive -$VACH unpack -i encrypted.vach -k keypair.kp +$CMD unpack -i encrypted.vach -k keypair.kp # # Delete any previous artifacts rm -f $ARTIFACTS