Skip to content

Commit

Permalink
feat: add cargo machete to clean up unused deps (#485)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Zhu <[email protected]>
  • Loading branch information
sagar-a16z and moodlezoup authored Oct 22, 2024
1 parent b94371f commit 9f387e0
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 30 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ jobs:
command: clippy
args: --all

machete:
runs-on: ubuntu-latest
steps:
- uses: bnjbvr/cargo-machete@main
- name: cargo machete
run: cargo machete --with-metadata

test:
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,11 @@ rand = "0.8.5"
sysinfo = "0.30.8"
syn = { version = "1.0.0", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.68"
rmp-serde = "1.3.0"
toml_edit = "0.22.14"

jolt-sdk = { path = "./jolt-sdk" }
jolt-core = { path = "./jolt-core" }
alloy-core = "0.7.6"
common = { path = "./common" }

[profile.test]
Expand All @@ -96,3 +94,6 @@ debug = false
ark-ff = { git = "https://github.com/a16z/arkworks-algebra", branch = "optimize/field-from-u64" }
ark-ec = { git = "https://github.com/a16z/arkworks-algebra", branch = "optimize/field-from-u64" }
ark-serialize = { git = "https://github.com/a16z/arkworks-algebra", branch = "optimize/field-from-u64" }

[workspace.metadata.cargo-machete]
ignored = ["jolt-sdk"]
3 changes: 0 additions & 3 deletions examples/fibonacci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ edition = "2021"
[dependencies]
jolt-sdk = { path = "../../jolt-sdk", features = ["host"] }
guest = { package = "fibonacci-guest", path = "./guest" }

hex = "0.4.3"
sha3 = { version = "0.10.8", default-features = false }
3 changes: 0 additions & 3 deletions examples/multi-function/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ edition = "2021"
[dependencies]
jolt-sdk = { path = "../../jolt-sdk", features = ["host"] }
guest = { package = "multi-function-guest", path = "./guest" }

hex = "0.4.3"
sha3 = { version = "0.10.8", default-features = false }
1 change: 0 additions & 1 deletion examples/sha2-chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ jolt-sdk = { path = "../../jolt-sdk", features = ["host"] }
guest = { package = "sha2-chain-guest", path = "./guest" }

hex = "0.4.3"
sha3 = { version = "0.10.8", default-features = false }
1 change: 0 additions & 1 deletion examples/sha2-ex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ jolt-sdk = { path = "../../jolt-sdk", features = ["host"] }
guest = { package = "sha2-guest", path = "./guest" }

hex = "0.4.3"
sha3 = { version = "0.10.8", default-features = false }
3 changes: 1 addition & 2 deletions examples/sha3-chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ edition = "2021"
jolt-sdk = { path = "../../jolt-sdk", features = ["host"] }
guest = { package = "sha3-chain-guest", path = "./guest" }

hex = "0.4.3"
sha3 = { version = "0.10.8", default-features = false }
hex = "0.4.3"
1 change: 0 additions & 1 deletion examples/sha3-ex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ jolt-sdk = { path = "../../jolt-sdk", features = ["host"] }
guest = { package = "sha3-guest", path = "./guest" }

hex = "0.4.3"
sha3 = { version = "0.10.8", default-features = false }
6 changes: 0 additions & 6 deletions jolt-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ enum_dispatch = "0.3.12"
fixedbitset = "0.5.0"
itertools = "0.10.0"
lazy_static = "1.4.0"
merlin = "3.0.0"
num-integer = "0.1.45"
postcard = { version = "1.0.8", default-features = false, features = [
"use-std",
Expand All @@ -41,13 +40,10 @@ rand = "0.7.3"
rand_chacha = { version = "0.3.0", default-features = false }
rand_core = { version = "0.6.4", default-features = false }
rayon = { version = "^1.8.0", optional = true }
rgb = "0.8.37"
serde = { version = "1.0.*", default-features = false }
sha3 = "0.10.8"
smallvec = "1.13.1"
strum = "0.26.3"
strum_macros = "0.26.4"
textplots = "0.8.4"
thiserror = "1.0.58"
tracing = "0.1.37"
tracing-chrome = "0.7.1"
Expand All @@ -66,10 +62,8 @@ common = { path = "../common" }
tracer = { path = "../tracer" }
bincode = "1.3.3"
bytemuck = "1.19.0"
hex = "0.4.3"
tokio = { version = "1.38.0", optional = true }
alloy-primitives = "0.7.6"
alloy-sol-macro = "0.7.6"
alloy-sol-types = "0.7.6"

[dev-dependencies]
Expand Down
2 changes: 0 additions & 2 deletions jolt-evm-verifier/script/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ edition = "2021"

[dependencies]
alloy-primitives = "0.7.6"
alloy-rs = "0.2.1"
alloy-sol-macro = "0.7.6"
alloy-sol-types = "0.7.6"
ark-bn254 = "0.4.0"
ark-ff = "0.4.2"
Expand Down
8 changes: 0 additions & 8 deletions jolt-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,19 @@ host = [
"dep:common",
"dep:jolt-core",
"dep:ark-ec",
"dep:ark-ff",
"dep:ark-bn254",
"dep:ark-serialize",
"dep:eyre",
"postcard/use-std",
]

guest-std = [
"postcard/use-std",
"serde/std",
"jolt-sdk-macros/guest-std",
]

[dependencies]
postcard = { version = "1.0.8", default-features = false }
serde = { version = "1.0.196", default-features = false }
eyre = { version = "0.6.12", optional = true }
ark-ec = { version = "0.4.2", default-features = false, optional = true }
ark-ff = { version = "0.4.2", default-features = false, optional = true }
ark-bn254 = { version = "0.4.0", default-features = false, optional = true }
ark-serialize = { version = "0.4.2", features = ["derive"], optional = true }

jolt-sdk-macros = { path = "./macros" }
jolt-core = { path = "../jolt-core", optional = true }
Expand Down
1 change: 0 additions & 1 deletion jolt-sdk/macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ guest-std = []
syn = { version = "1.0", features = ["full"] }
quote = "1.0"
proc-macro2 = "1.0.79"
lazy_static = "1.4"

common = { path = "../../common" }

0 comments on commit 9f387e0

Please sign in to comment.