Skip to content

Commit e812b78

Browse files
authored
Refactor in crates folder (#979)
* Refactor: sub-crates in crates folder * Removed submodule stone-demo * Fix ensure-no_std
1 parent 585fed9 commit e812b78

File tree

359 files changed

+64
-4101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

359 files changed

+64
-4101
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "provers/stone-demo"]
2-
path = provers/stone-demo
3-
url = https://github.com/lambdaclass/stone-compatibility-testing

Cargo.toml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[workspace]
22

33
members = [
4-
"math",
5-
"crypto",
6-
"gpu",
74
"benches",
8-
"provers/plonk",
9-
"provers/sumcheck",
10-
"provers/stark",
11-
"provers/groth16",
12-
"provers/groth16/arkworks-adapter",
13-
"provers/groth16/circom-adapter",
5+
"crates/crypto",
6+
"crates/gpu",
7+
"crates/math",
8+
"crates/provers/groth16",
9+
"crates/provers/groth16/arkworks-adapter",
10+
"crates/provers/groth16/circom-adapter",
11+
"crates/provers/plonk",
12+
"crates/provers/stark",
13+
"crates/provers/sumcheck",
14+
"crates/provers/winterfell_adapter",
1415
"examples/merkle-tree-cli",
1516
"examples/prove-miden",
16-
"provers/winterfell_adapter",
1717
"examples/shamir_secret_sharing",
1818
"examples/pinocchio",
1919
"examples/prove-verify-circom",
@@ -29,26 +29,26 @@ license = "Apache-2.0"
2929
repository = "https://github.com/lambdaclass/lambdaworks"
3030

3131
[workspace.dependencies]
32+
lambdaworks-crypto = { path = "./crates/crypto", version = "0.11.0", default-features = false }
33+
lambdaworks-gpu = { path = "./crates/gpu", version = "0.11.0" }
34+
lambdaworks-math = { path = "./crates/math", version = "0.11.0", default-features = false }
35+
lambdaworks-groth16 = { path = "./crates/provers/groth16" }
36+
lambdaworks-circom-adapter = { path = "./crates/provers/groth16/circom-adapter" }
37+
lambdaworks-sumcheck = { path = "./crates/provers/sumcheck" }
38+
lambdaworks-winterfell-adapter = { path = "./crates/provers/winterfell_adapter" }
39+
stark-platinum-prover = { path = "./crates/provers/stark" }
3240
iai-callgrind = "0.3.1"
33-
lambdaworks-crypto = { path = "./crypto", version = "0.11.0", default-features = false }
34-
lambdaworks-gpu = { path = "./gpu", version = "0.11.0" }
35-
lambdaworks-math = { path = "./math", version = "0.11.0", default-features = false }
36-
stark-platinum-prover = { path = "./provers/stark" }
37-
lambdaworks-winterfell-adapter = { path = "./provers/winterfell_adapter" }
38-
lambdaworks-groth16 = { path = "./provers/groth16" }
39-
lambdaworks-circom-adapter = { path = "./provers/groth16/circom-adapter" }
40-
lambdaworks-sumcheck = { path = "./provers/sumcheck" }
4141

4242
[patch.crates-io]
43+
miden-air = { git = "https://github.com/lambdaclass/miden-vm" }
44+
miden-assembly = { git = "https://github.com/lambdaclass/miden-vm" }
45+
miden-core = { git = "https://github.com/lambdaclass/miden-vm" }
46+
miden-processor = { git = "https://github.com/lambdaclass/miden-vm" }
4347
winter-air = { git = "https://github.com/lambdaclass/winterfell-for-lambdaworks.git", branch = "derive-clone-v6.4" }
4448
winter-prover = { git = "https://github.com/lambdaclass/winterfell-for-lambdaworks.git", branch = "derive-clone-v6.4" }
4549
winter-math = { git = "https://github.com/lambdaclass/winterfell-for-lambdaworks.git", branch = "derive-clone-v6.4" }
4650
winter-utils = { git = "https://github.com/lambdaclass/winterfell-for-lambdaworks.git", branch = "derive-clone-v6.4" }
4751
winter-crypto = { git = "https://github.com/lambdaclass/winterfell-for-lambdaworks.git", branch = "derive-clone-v6.4" }
48-
miden-air = { git = "https://github.com/lambdaclass/miden-vm" }
49-
miden-core = { git = "https://github.com/lambdaclass/miden-vm" }
50-
miden-assembly = { git = "https://github.com/lambdaclass/miden-vm" }
51-
miden-processor = { git = "https://github.com/lambdaclass/miden-vm" }
5252

5353
[profile.bench]
5454
lto = true

benches/Cargo.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@ starknet-ff = { git = "https://github.com/xJonathanLEI/starknet-rs", tag = "star
1414
starknet-crypto = { git = "https://github.com/xJonathanLEI/starknet-rs", tag = "starknet-crypto/v0.6.2" }
1515
pathfinder-crypto = { git = "https://github.com/eqlabs/pathfinder.git" }
1616

17-
[dependencies.lambdaworks-math]
18-
path = "../math"
19-
20-
[dependencies.lambdaworks-crypto]
21-
path = "../crypto"
17+
lambdaworks-math.workspace = true
18+
lambdaworks-crypto.workspace = true
2219

2320
[dev-dependencies]
2421
criterion = { version = "0.5.1", default-features = false }
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.

gpu/Cargo.toml renamed to crates/gpu/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ thiserror = "1.0.38"
1212
metal = { version = "0.24.0", optional = true }
1313
objc = { version = "0.2.7", optional = true }
1414

15+
[dev-dependencies]
16+
proptest = "1.1.0"
17+
rand = "0.8.5"
18+
19+
[build-dependencies]
20+
walkdir = { version = "2.3.3", optional = true }
21+
1522
[features]
1623
metal = ["dep:metal", "dep:objc"]
1724
cuda = ["dep:walkdir"]
@@ -23,10 +30,3 @@ cuda = ["dep:walkdir"]
2330
# as default. If you don't want to compile with all of these
2431
# use `--no-default-features`.
2532
default = []
26-
27-
[dev-dependencies]
28-
proptest = "1.1.0"
29-
rand = "0.8.5"
30-
31-
[build-dependencies]
32-
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.

provers/groth16/arkworks-adapter/Cargo.toml renamed to crates/provers/groth16/arkworks-adapter/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ repository.workspace = true
88
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
99

1010
[dependencies]
11-
lambdaworks-math = { path = "../../../math" }
12-
lambdaworks-groth16 = { path = "../" }
13-
ark-r1cs-std = { version = "^0.3.1"}
14-
ark-bls12-381 = { version = "0.4.0"}
11+
lambdaworks-math.workspace = true
12+
lambdaworks-groth16.workspace = true
13+
ark-r1cs-std = { version = "^0.3.1" }
14+
ark-bls12-381 = { version = "0.4.0" }
1515
ark-ff = { version = "^0.4.2" }
1616
ark-relations = { version = "^0.4.0" }
17-
ark-serialize = {version = "0.4.2"}
17+
ark-serialize = { version = "0.4.2" }
1818
num-bigint = { version = "0.4", default-features = false }
1919
rand = "0.8.5"

provers/groth16/circom-adapter/Cargo.toml renamed to crates/provers/groth16/circom-adapter/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ repository.workspace = true
88
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
99

1010
[dependencies]
11-
lambdaworks-math = { path = "../../../math" }
12-
lambdaworks-groth16 = { path = "../" }
11+
lambdaworks-math.workspace = true
12+
lambdaworks-groth16.workspace = true
13+
1314
serde = { version = "1.0" }
1415
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.

provers/plonk/Cargo.toml renamed to crates/provers/plonk/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ edition = "2021"
88
[dependencies]
99
lambdaworks-math.workspace = true
1010
lambdaworks-crypto.workspace = true
11+
1112
serde = { version = "1.0", features = ["derive"] }
1213
serde_json = "1.0"
1314
sha3 = { version = "0.10", default-features = false }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

provers/stark/Cargo.toml renamed to crates/provers/stark/Cargo.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ license.workspace = true
99
crate-type = ["cdylib", "rlib"]
1010

1111
[dependencies]
12-
lambdaworks-math = { workspace = true , features = ["std", "lambdaworks-serde-binary"] }
12+
lambdaworks-math = { workspace = true, features = [
13+
"std",
14+
"lambdaworks-serde-binary",
15+
] }
1316
lambdaworks-crypto = { workspace = true, features = ["std", "serde"] }
14-
miden-core = { git="https://github.com/lambdaclass/miden-vm", optional=true}
17+
18+
miden-core = { git = "https://github.com/lambdaclass/miden-vm", optional = true }
1519

1620
rand = "0.8.5"
1721
thiserror = "1.0.38"
@@ -30,7 +34,7 @@ rayon = { version = "1.8.0", optional = true }
3034
wasm-bindgen = { version = "0.2", optional = true }
3135
serde-wasm-bindgen = { version = "0.5", optional = true }
3236
web-sys = { version = "0.3.64", features = ['console'], optional = true }
33-
serde_cbor = { version = "0.11.1"}
37+
serde_cbor = { version = "0.11.1" }
3438

3539
[dev-dependencies]
3640
hex = "0.4.3"
@@ -44,7 +48,7 @@ wasm-bindgen-test = "0.3.0"
4448

4549
[features]
4650
test_fiat_shamir = []
47-
instruments = [] # This enables timing prints in prover and verifier
51+
instruments = [] # This enables timing prints in prover and verifier
4852
metal = ["lambdaworks-math/metal"]
4953
parallel = ["dep:rayon", "lambdaworks-crypto/parallel"]
5054
wasm = ["dep:wasm-bindgen", "dep:serde-wasm-bindgen", "dep:web-sys"]
File renamed without changes.

0 commit comments

Comments
 (0)