From edb7f3198704d8a99dc5e71a07b16135aee4b1c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s?= <47506558+MegaRedHand@users.noreply.github.com> Date: Mon, 3 Jul 2023 12:55:46 -0300 Subject: [PATCH] chore: remove unused dependencies (#1307) * Remove unused dependencies * Update changelog --- CHANGELOG.md | 5 +++ Cargo.lock | 75 +------------------------------------ Cargo.toml | 11 +----- felt/src/lib_bigint_felt.rs | 1 + vm/Cargo.toml | 13 +++---- 5 files changed, 14 insertions(+), 91 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8939b8e053..9f11bf3f42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ #### Upcoming Changes +* chore: remove unused dependencies [#1307](https://github.com/lambdaclass/cairo-vm/pull/1307) + * rand_core + * serde_bytes + * rusty-hook (*dev-dependency*) + #### [0.8.1] - 2023-6-29 * chore: change mentions of *cairo-rs-py* to *cairo-vm-py* [#1296](https://github.com/lambdaclass/cairo-vm/pull/1296) diff --git a/Cargo.lock b/Cargo.lock index 444b5e26ed..5d1af522b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -464,7 +464,7 @@ dependencies = [ "serde", "smol_str", "thiserror", - "toml 0.4.10", + "toml", ] [[package]] @@ -697,11 +697,8 @@ dependencies = [ "num-traits 0.2.15", "proptest", "rand", - "rand_core", "rstest", - "rusty-hook", "serde", - "serde_bytes", "serde_json", "sha2", "sha3", @@ -742,15 +739,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "ci_info" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f638c70e8c5753795cc9a8c07c44da91554a09e4cf11a7326e8161b0a3c45e" -dependencies = [ - "envmnt", -] - [[package]] name = "clap" version = "2.34.0" @@ -1049,16 +1037,6 @@ dependencies = [ "log", ] -[[package]] -name = "envmnt" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2d328fc287c61314c4a61af7cfdcbd7e678e39778488c7cb13ec133ce0f4059" -dependencies = [ - "fsio", - "indexmap 1.9.3", -] - [[package]] name = "equivalent" version = "1.0.0" @@ -1107,12 +1085,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "fsio" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fd087255f739f4f1aeea69f11b72f8080e9c2e7645cd06955dad4a178a49e3" - [[package]] name = "funty" version = "2.0.0" @@ -1246,15 +1218,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getopts" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" -dependencies = [ - "unicode-width", -] - [[package]] name = "getrandom" version = "0.2.10" @@ -1676,12 +1639,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" -[[package]] -name = "nias" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab250442c86f1850815b5d268639dff018c0627022bc1940eb2d642ca1ce12f0" - [[package]] name = "nom" version = "7.1.3" @@ -2260,18 +2217,6 @@ dependencies = [ "wait-timeout", ] -[[package]] -name = "rusty-hook" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96cee9be61be7e1cbadd851e58ed7449c29c620f00b23df937cb9cbc04ac21a3" -dependencies = [ - "ci_info", - "getopts", - "nias", - "toml 0.5.11", -] - [[package]] name = "ryu" version = "1.0.13" @@ -2368,15 +2313,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde_bytes" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" -dependencies = [ - "serde", -] - [[package]] name = "serde_cbor" version = "0.11.2" @@ -2725,15 +2661,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml_datetime" version = "0.6.3" diff --git a/Cargo.toml b/Cargo.toml index e1e5f6e8c0..b3ae6ea61b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,5 @@ [workspace] -members = [ - "cairo-vm-cli", - "felt", - "vm", - "hint_accountant", -] +members = ["cairo-vm-cli", "felt", "vm", "hint_accountant"] exclude = ["ensure-no_std"] [workspace.package] @@ -28,9 +23,6 @@ rand = { version = "0.8.3", features = ["small_rng"], default-features = false } num-traits = { version = "0.2", default-features = false } num-integer = { version = "0.1.45", default-features = false } serde = { version = "1.0", features = ["derive"], default-features = false } -serde_bytes = { version = "0.11.9", default-features = false, features = [ - "alloc", -] } serde_json = { version = "1.0", features = [ "arbitrary_precision", "alloc", @@ -44,7 +36,6 @@ starknet-crypto = { version = "0.5.0", default-features = false, features = [ "alloc", ] } sha3 = { version = "0.10.1", default-features = false } -rand_core = { version = "0.6.4", default-features = false } lazy_static = { version = "1.4.0", default-features = false, features = [ "spin_no_std", ] } diff --git a/felt/src/lib_bigint_felt.rs b/felt/src/lib_bigint_felt.rs index f505cb4e04..1baf683af0 100644 --- a/felt/src/lib_bigint_felt.rs +++ b/felt/src/lib_bigint_felt.rs @@ -1438,6 +1438,7 @@ mod test { let p_felt = Felt252::max_value(); + #[allow(deprecated)] let modpow = x.modpow(&y, &p_felt).to_biguint(); prop_assert!(modpow < p, "{}", modpow); } diff --git a/vm/Cargo.toml b/vm/Cargo.toml index db442cbeaf..bddc75d616 100644 --- a/vm/Cargo.toml +++ b/vm/Cargo.toml @@ -12,7 +12,6 @@ default = ["std", "with_mimalloc"] with_mimalloc = ["mimalloc"] std = [ "serde_json/std", - "serde_bytes/std", "bincode/std", "anyhow/std", "starknet-crypto/std", @@ -20,10 +19,13 @@ std = [ "dep:num-prime", "thiserror-no-std/std", ] -cairo-1-hints = ["dep:cairo-lang-starknet", "dep:cairo-lang-casm", "dep:ark-ff", "dep:ark-std"] -lambdaworks-felt = [ - "felt/lambdaworks-felt" +cairo-1-hints = [ + "dep:cairo-lang-starknet", + "dep:cairo-lang-casm", + "dep:ark-ff", + "dep:ark-std", ] +lambdaworks-felt = ["felt/lambdaworks-felt"] # Note that these features are not retro-compatible with the cairo Python VM. test_utils = [ @@ -40,13 +42,11 @@ rand = { workspace = true } num-traits = { workspace = true } num-integer = { workspace = true } serde = { workspace = true } -serde_bytes = { workspace = true } serde_json = { workspace = true } hex = { workspace = true } bincode = { workspace = true } starknet-crypto = { workspace = true } sha3 = { workspace = true } -rand_core = { workspace = true } lazy_static = { workspace = true } nom = { workspace = true } sha2 = { workspace = true } @@ -79,7 +79,6 @@ wasm-bindgen-test = "0.3.34" [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] iai-callgrind = "0.3.1" -rusty-hook = "0.11" criterion = { version = "0.3", features = ["html_reports"] } proptest = "1.0.0"