Skip to content

Commit

Permalink
Add mcl backend
Browse files Browse the repository at this point in the history
c bindings feature

MCL backend implementation
  • Loading branch information
Maksasj committed Jan 20, 2025
1 parent 24dc6b2 commit 9ad35d3
Show file tree
Hide file tree
Showing 122 changed files with 6,818 additions and 5,211 deletions.
171 changes: 14 additions & 157 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ members = [
"blst-sppark",
"kzg",
"kzg-bench",
"mcl/kzg",
"mcl/kzg-bench",
"mcl",
"zkcrypto",
"constantine",
"rust-eth-kzg-benches",
]


[profile.bench]
lto = "thin"
1 change: 1 addition & 0 deletions kzg/src/das.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use core::fmt::Debug;
use core::mem::size_of;

#[cfg(feature = "parallel")]
use rayon::prelude::*;
Expand Down
File renamed without changes.
93 changes: 93 additions & 0 deletions mcl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[package]
name = "rust-kzg-mcl"
version = "0.1.0"
edition = "2021"

[dependencies]
blst = "0.3.11"
kzg = { path = "../kzg", default-features = false }
libc = { version = "0.2.148", default-features = false }
once_cell = { version = "1.18.0", features = ["critical-section"], default-features = false }
rand = { version = "0.8.5", optional = true }
rayon = { version = "1.8.0", optional = true }
smallvec = { version = "1.11.1", features = ["const_generics"] }
hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
mcl_rust = { git = "https://github.com/herumi/mcl-rust.git" }

[dev-dependencies]
criterion = "0.5.1"
kzg-bench = { path = "../kzg-bench" }
rand = "0.8.5"


[features]
default = [
"std",
"rand",
"bgmw"
]
std = [
"hex/std",
"kzg/std",
"libc/std",
"once_cell/std",
]
rand = [
"dep:rand",
"kzg/rand",
]
parallel = [
"dep:rayon",
"kzg/parallel"
]
bgmw = [
"kzg/bgmw"
]
arkmsm = [
"kzg/arkmsm"
]
c_bindings = []

[[bench]]
name = "das"
harness = false

[[bench]]
name = "fft"
harness = false

[[bench]]
name = "poly"
harness = false

[[bench]]
name = "kzg"
harness = false

[[bench]]
name = "fk_20"
harness = false

[[bench]]
name = "recover"
harness = false

[[bench]]
name = "zero_poly"
harness = false

[[bench]]
name = "eip_4844"
harness = false

[[bench]]
name = "eip_7594"
harness = false

[[bench]]
name = "lincomb"
harness = false

[[bench]]
name = "trusted_setup"
harness = false
Loading

0 comments on commit 9ad35d3

Please sign in to comment.