Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor in crates folder #979

Merged
merged 3 commits into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "provers/stone-demo"]
path = provers/stone-demo
url = https://github.com/lambdaclass/stone-compatibility-testing
44 changes: 22 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[workspace]

members = [
"math",
"crypto",
"gpu",
"benches",
"provers/plonk",
"provers/sumcheck",
"provers/stark",
"provers/groth16",
"provers/groth16/arkworks-adapter",
"provers/groth16/circom-adapter",
"crates/crypto",
"crates/gpu",
"crates/math",
"crates/provers/groth16",
"crates/provers/groth16/arkworks-adapter",
"crates/provers/groth16/circom-adapter",
"crates/provers/plonk",
"crates/provers/stark",
"crates/provers/sumcheck",
"crates/provers/winterfell_adapter",
"examples/merkle-tree-cli",
"examples/prove-miden",
"provers/winterfell_adapter",
"examples/shamir_secret_sharing",
"examples/pinocchio",
"examples/prove-verify-circom",
Expand All @@ -29,26 +29,26 @@ license = "Apache-2.0"
repository = "https://github.com/lambdaclass/lambdaworks"

[workspace.dependencies]
lambdaworks-crypto = { path = "./crates/crypto", version = "0.11.0", default-features = false }
lambdaworks-gpu = { path = "./crates/gpu", version = "0.11.0" }
lambdaworks-math = { path = "./crates/math", version = "0.11.0", default-features = false }
lambdaworks-groth16 = { path = "./crates/provers/groth16" }
lambdaworks-circom-adapter = { path = "./crates/provers/groth16/circom-adapter" }
lambdaworks-sumcheck = { path = "./crates/provers/sumcheck" }
lambdaworks-winterfell-adapter = { path = "./crates/provers/winterfell_adapter" }
stark-platinum-prover = { path = "./crates/provers/stark" }
iai-callgrind = "0.3.1"
lambdaworks-crypto = { path = "./crypto", version = "0.11.0", default-features = false }
lambdaworks-gpu = { path = "./gpu", version = "0.11.0" }
lambdaworks-math = { path = "./math", version = "0.11.0", default-features = false }
stark-platinum-prover = { path = "./provers/stark" }
lambdaworks-winterfell-adapter = { path = "./provers/winterfell_adapter" }
lambdaworks-groth16 = { path = "./provers/groth16" }
lambdaworks-circom-adapter = { path = "./provers/groth16/circom-adapter" }
lambdaworks-sumcheck = { path = "./provers/sumcheck" }

[patch.crates-io]
miden-air = { git = "https://github.com/lambdaclass/miden-vm" }
miden-assembly = { git = "https://github.com/lambdaclass/miden-vm" }
miden-core = { git = "https://github.com/lambdaclass/miden-vm" }
miden-processor = { git = "https://github.com/lambdaclass/miden-vm" }
winter-air = { git = "https://github.com/lambdaclass/winterfell-for-lambdaworks.git", branch = "derive-clone-v6.4" }
winter-prover = { git = "https://github.com/lambdaclass/winterfell-for-lambdaworks.git", branch = "derive-clone-v6.4" }
winter-math = { git = "https://github.com/lambdaclass/winterfell-for-lambdaworks.git", branch = "derive-clone-v6.4" }
winter-utils = { git = "https://github.com/lambdaclass/winterfell-for-lambdaworks.git", branch = "derive-clone-v6.4" }
winter-crypto = { git = "https://github.com/lambdaclass/winterfell-for-lambdaworks.git", branch = "derive-clone-v6.4" }
miden-air = { git = "https://github.com/lambdaclass/miden-vm" }
miden-core = { git = "https://github.com/lambdaclass/miden-vm" }
miden-assembly = { git = "https://github.com/lambdaclass/miden-vm" }
miden-processor = { git = "https://github.com/lambdaclass/miden-vm" }

[profile.bench]
lto = true
Expand Down
7 changes: 2 additions & 5 deletions benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ starknet-ff = { git = "https://github.com/xJonathanLEI/starknet-rs", tag = "star
starknet-crypto = { git = "https://github.com/xJonathanLEI/starknet-rs", tag = "starknet-crypto/v0.6.2" }
pathfinder-crypto = { git = "https://github.com/eqlabs/pathfinder.git" }

[dependencies.lambdaworks-math]
path = "../math"

[dependencies.lambdaworks-crypto]
path = "../crypto"
lambdaworks-math.workspace = true
lambdaworks-crypto.workspace = true

[dev-dependencies]
criterion = { version = "0.5.1", default-features = false }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions gpu/Cargo.toml → crates/gpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ thiserror = "1.0.38"
metal = { version = "0.24.0", optional = true }
objc = { version = "0.2.7", optional = true }

[dev-dependencies]
proptest = "1.1.0"
rand = "0.8.5"

[build-dependencies]
walkdir = { version = "2.3.3", optional = true }

[features]
metal = ["dep:metal", "dep:objc"]
cuda = ["dep:walkdir"]
Expand All @@ -23,10 +30,3 @@ cuda = ["dep:walkdir"]
# as default. If you don't want to compile with all of these
# use `--no-default-features`.
default = []

[dev-dependencies]
proptest = "1.1.0"
rand = "0.8.5"

[build-dependencies]
walkdir = { version = "2.3.3", optional = true }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ repository.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
lambdaworks-math = { path = "../../../math" }
lambdaworks-groth16 = { path = "../" }
ark-r1cs-std = { version = "^0.3.1"}
ark-bls12-381 = { version = "0.4.0"}
lambdaworks-math.workspace = true
lambdaworks-groth16.workspace = true
ark-r1cs-std = { version = "^0.3.1" }
ark-bls12-381 = { version = "0.4.0" }
ark-ff = { version = "^0.4.2" }
ark-relations = { version = "^0.4.0" }
ark-serialize = {version = "0.4.2"}
ark-serialize = { version = "0.4.2" }
num-bigint = { version = "0.4", default-features = false }
rand = "0.8.5"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ repository.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
lambdaworks-math = { path = "../../../math" }
lambdaworks-groth16 = { path = "../" }
lambdaworks-math.workspace = true
lambdaworks-groth16.workspace = true

serde = { version = "1.0" }
serde_json = "1"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ edition = "2021"
[dependencies]
lambdaworks-math.workspace = true
lambdaworks-crypto.workspace = true

serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
sha3 = { version = "0.10", default-features = false }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 8 additions & 4 deletions provers/stark/Cargo.toml → crates/provers/stark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ license.workspace = true
crate-type = ["cdylib", "rlib"]

[dependencies]
lambdaworks-math = { workspace = true , features = ["std", "lambdaworks-serde-binary"] }
lambdaworks-math = { workspace = true, features = [
"std",
"lambdaworks-serde-binary",
] }
lambdaworks-crypto = { workspace = true, features = ["std", "serde"] }
miden-core = { git="https://github.com/lambdaclass/miden-vm", optional=true}

miden-core = { git = "https://github.com/lambdaclass/miden-vm", optional = true }

rand = "0.8.5"
thiserror = "1.0.38"
Expand All @@ -30,7 +34,7 @@ rayon = { version = "1.8.0", optional = true }
wasm-bindgen = { version = "0.2", optional = true }
serde-wasm-bindgen = { version = "0.5", optional = true }
web-sys = { version = "0.3.64", features = ['console'], optional = true }
serde_cbor = { version = "0.11.1"}
serde_cbor = { version = "0.11.1" }

[dev-dependencies]
hex = "0.4.3"
Expand All @@ -44,7 +48,7 @@ wasm-bindgen-test = "0.3.0"

[features]
test_fiat_shamir = []
instruments = [] # This enables timing prints in prover and verifier
instruments = [] # This enables timing prints in prover and verifier
metal = ["lambdaworks-math/metal"]
parallel = ["dep:rayon", "lambdaworks-crypto/parallel"]
wasm = ["dep:wasm-bindgen", "dep:serde-wasm-bindgen", "dep:web-sys"]
Expand Down
File renamed without changes.
File renamed without changes.
Loading
Loading