-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #257 from ArtiomTr/Bump-c-kzg-4844-commit
Bump C_KZG_4844_GIT_HASH
- Loading branch information
Showing
12 changed files
with
207 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From f34d21606bb5bc3dee4e7a643d7ab89a2c994fef Mon Sep 17 00:00:00 2001 | ||
From: sirse <[email protected]> | ||
Date: Thu, 25 Jan 2024 11:26:35 +0200 | ||
Subject: [PATCH] Patch nim bindings | ||
|
||
--- | ||
bindings/nim/kzg_abi.nim | 5 ++++- | ||
1 file changed, 4 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/bindings/nim/kzg_abi.nim b/bindings/nim/kzg_abi.nim | ||
index 36e4ba1..74d0ebc 100644 | ||
--- a/bindings/nim/kzg_abi.nim | ||
+++ b/bindings/nim/kzg_abi.nim | ||
@@ -10,6 +10,7 @@ from os import DirSep, AltSep | ||
const | ||
# kzgPath: c-kzg-4844 project path, removing 3 last elem | ||
kzgPath = currentSourcePath.rsplit({DirSep, AltSep}, 3)[0] & "/" | ||
+ rustKzgPath = currentSourcePath.rsplit({DirSep, AltSep}, 5)[0] & "/" | ||
blstPath = kzgPath & "blst/" | ||
srcPath = kzgPath & "src/" | ||
bindingsPath = blstPath & "bindings" | ||
@@ -20,7 +21,9 @@ when not defined(kzgExternalBlst): | ||
{.compile: blstPath & "src/server.c"} | ||
{.passc: "-D__BLST_PORTABLE__"} | ||
|
||
-{.compile: srcPath & "c_kzg_4844.c"} | ||
+{.passl: "-L" & rustKzgPath & "target/release" .} | ||
+{.passl: "-l:rust_kzg_arkworks.a" .} | ||
+{.passl: "-lm" .} | ||
|
||
{.passc: "-I" & bindingsPath .} | ||
{.passc: "-I" & srcPath .} | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
From c3d4cb77f5a797bd8f454a0d88e034391514ebd7 Mon Sep 17 00:00:00 2001 | ||
From e7d529a9ba017de920555ae9b4ab05a18174cdcf Mon Sep 17 00:00:00 2001 | ||
From: sirse <[email protected]> | ||
Date: Thu, 26 Oct 2023 13:46:19 +0300 | ||
Subject: [PATCH] Patch rust binding | ||
Date: Thu, 25 Jan 2024 11:42:12 +0200 | ||
Subject: [PATCH] Patch rust bindings | ||
|
||
--- | ||
bindings/rust/Cargo.toml | 1 + | ||
bindings/rust/build.rs | 29 +++++------------------------ | ||
2 files changed, 6 insertions(+), 24 deletions(-) | ||
bindings/rust/build.rs | 22 +++------------------- | ||
2 files changed, 4 insertions(+), 19 deletions(-) | ||
|
||
diff --git a/bindings/rust/Cargo.toml b/bindings/rust/Cargo.toml | ||
index ab1f5b8..44e410e 100644 | ||
index 98bd814..9391f27 100644 | ||
--- a/bindings/rust/Cargo.toml | ||
+++ b/bindings/rust/Cargo.toml | ||
@@ -1,3 +1,4 @@ | ||
|
@@ -18,7 +18,7 @@ index ab1f5b8..44e410e 100644 | |
name = "c-kzg" | ||
version = "0.1.0" | ||
diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs | ||
index 692305a..e874ccd 100644 | ||
index 5148333..ec42e21 100644 | ||
--- a/bindings/rust/build.rs | ||
+++ b/bindings/rust/build.rs | ||
@@ -15,24 +15,7 @@ fn main() { | ||
|
@@ -27,7 +27,7 @@ index 692305a..e874ccd 100644 | |
|
||
- let mut cc = cc::Build::new(); | ||
- | ||
- #[cfg(windows)] | ||
- #[cfg(all(windows, target_env = "msvc"))] | ||
- { | ||
- cc.flag("-D_CRT_SECURE_NO_WARNINGS"); | ||
- | ||
|
@@ -47,7 +47,7 @@ index 692305a..e874ccd 100644 | |
|
||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); | ||
let bindings_out_path = out_dir.join("generated.rs"); | ||
@@ -46,14 +29,12 @@ fn main() { | ||
@@ -46,7 +29,8 @@ fn main() { | ||
); | ||
|
||
// Finally, tell cargo this provides ckzg/ckzg_min | ||
|
@@ -56,16 +56,7 @@ index 692305a..e874ccd 100644 | |
+ println!("cargo:rustc-link-arg=-l:rust_kzg_arkworks.a"); | ||
} | ||
|
||
-fn make_bindings<P>( | ||
- header_path: &str, | ||
- blst_headers_dir: &str, | ||
- bindings_out_path: P, | ||
-) where | ||
+fn make_bindings<P>(header_path: &str, blst_headers_dir: &str, bindings_out_path: P) | ||
+where | ||
P: AsRef<std::path::Path>, | ||
{ | ||
use bindgen::Builder; | ||
fn make_bindings<P>(header_path: &str, blst_headers_dir: &str, bindings_out_path: P) | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From f34d21606bb5bc3dee4e7a643d7ab89a2c994fef Mon Sep 17 00:00:00 2001 | ||
From: sirse <[email protected]> | ||
Date: Thu, 25 Jan 2024 11:26:35 +0200 | ||
Subject: [PATCH] Patch nim bindings | ||
|
||
--- | ||
bindings/nim/kzg_abi.nim | 5 ++++- | ||
1 file changed, 4 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/bindings/nim/kzg_abi.nim b/bindings/nim/kzg_abi.nim | ||
index 36e4ba1..74d0ebc 100644 | ||
--- a/bindings/nim/kzg_abi.nim | ||
+++ b/bindings/nim/kzg_abi.nim | ||
@@ -10,6 +10,7 @@ from os import DirSep, AltSep | ||
const | ||
# kzgPath: c-kzg-4844 project path, removing 3 last elem | ||
kzgPath = currentSourcePath.rsplit({DirSep, AltSep}, 3)[0] & "/" | ||
+ rustKzgPath = currentSourcePath.rsplit({DirSep, AltSep}, 5)[0] & "/" | ||
blstPath = kzgPath & "blst/" | ||
srcPath = kzgPath & "src/" | ||
bindingsPath = blstPath & "bindings" | ||
@@ -20,7 +21,9 @@ when not defined(kzgExternalBlst): | ||
{.compile: blstPath & "src/server.c"} | ||
{.passc: "-D__BLST_PORTABLE__"} | ||
|
||
-{.compile: srcPath & "c_kzg_4844.c"} | ||
+{.passl: "-L" & rustKzgPath & "target/release" .} | ||
+{.passl: "-l:rust_kzg_blst.a" .} | ||
+{.passl: "-lm" .} | ||
|
||
{.passc: "-I" & bindingsPath .} | ||
{.passc: "-I" & srcPath .} | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
From c3d4cb77f5a797bd8f454a0d88e034391514ebd7 Mon Sep 17 00:00:00 2001 | ||
From e7d529a9ba017de920555ae9b4ab05a18174cdcf Mon Sep 17 00:00:00 2001 | ||
From: sirse <[email protected]> | ||
Date: Thu, 26 Oct 2023 13:46:19 +0300 | ||
Subject: [PATCH] Patch rust binding | ||
Date: Thu, 25 Jan 2024 11:42:12 +0200 | ||
Subject: [PATCH] Patch rust bindings | ||
|
||
--- | ||
bindings/rust/Cargo.toml | 1 + | ||
bindings/rust/build.rs | 29 +++++------------------------ | ||
2 files changed, 6 insertions(+), 24 deletions(-) | ||
bindings/rust/build.rs | 22 +++------------------- | ||
2 files changed, 4 insertions(+), 19 deletions(-) | ||
|
||
diff --git a/bindings/rust/Cargo.toml b/bindings/rust/Cargo.toml | ||
index ab1f5b8..44e410e 100644 | ||
index 98bd814..9391f27 100644 | ||
--- a/bindings/rust/Cargo.toml | ||
+++ b/bindings/rust/Cargo.toml | ||
@@ -1,3 +1,4 @@ | ||
|
@@ -18,7 +18,7 @@ index ab1f5b8..44e410e 100644 | |
name = "c-kzg" | ||
version = "0.1.0" | ||
diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs | ||
index 692305a..e874ccd 100644 | ||
index 5148333..ec42e21 100644 | ||
--- a/bindings/rust/build.rs | ||
+++ b/bindings/rust/build.rs | ||
@@ -15,24 +15,7 @@ fn main() { | ||
|
@@ -27,7 +27,7 @@ index 692305a..e874ccd 100644 | |
|
||
- let mut cc = cc::Build::new(); | ||
- | ||
- #[cfg(windows)] | ||
- #[cfg(all(windows, target_env = "msvc"))] | ||
- { | ||
- cc.flag("-D_CRT_SECURE_NO_WARNINGS"); | ||
- | ||
|
@@ -47,7 +47,7 @@ index 692305a..e874ccd 100644 | |
|
||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); | ||
let bindings_out_path = out_dir.join("generated.rs"); | ||
@@ -46,14 +29,12 @@ fn main() { | ||
@@ -46,7 +29,8 @@ fn main() { | ||
); | ||
|
||
// Finally, tell cargo this provides ckzg/ckzg_min | ||
|
@@ -56,16 +56,7 @@ index 692305a..e874ccd 100644 | |
+ println!("cargo:rustc-link-arg=-l:rust_kzg_blst.a"); | ||
} | ||
|
||
-fn make_bindings<P>( | ||
- header_path: &str, | ||
- blst_headers_dir: &str, | ||
- bindings_out_path: P, | ||
-) where | ||
+fn make_bindings<P>(header_path: &str, blst_headers_dir: &str, bindings_out_path: P) | ||
+where | ||
P: AsRef<std::path::Path>, | ||
{ | ||
use bindgen::Builder; | ||
fn make_bindings<P>(header_path: &str, blst_headers_dir: &str, bindings_out_path: P) | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From f34d21606bb5bc3dee4e7a643d7ab89a2c994fef Mon Sep 17 00:00:00 2001 | ||
From: sirse <[email protected]> | ||
Date: Thu, 25 Jan 2024 11:26:35 +0200 | ||
Subject: [PATCH] Patch nim bindings | ||
|
||
--- | ||
bindings/nim/kzg_abi.nim | 5 ++++- | ||
1 file changed, 4 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/bindings/nim/kzg_abi.nim b/bindings/nim/kzg_abi.nim | ||
index 36e4ba1..74d0ebc 100644 | ||
--- a/bindings/nim/kzg_abi.nim | ||
+++ b/bindings/nim/kzg_abi.nim | ||
@@ -10,6 +10,7 @@ from os import DirSep, AltSep | ||
const | ||
# kzgPath: c-kzg-4844 project path, removing 3 last elem | ||
kzgPath = currentSourcePath.rsplit({DirSep, AltSep}, 3)[0] & "/" | ||
+ rustKzgPath = currentSourcePath.rsplit({DirSep, AltSep}, 5)[0] & "/" | ||
blstPath = kzgPath & "blst/" | ||
srcPath = kzgPath & "src/" | ||
bindingsPath = blstPath & "bindings" | ||
@@ -20,7 +21,9 @@ when not defined(kzgExternalBlst): | ||
{.compile: blstPath & "src/server.c"} | ||
{.passc: "-D__BLST_PORTABLE__"} | ||
|
||
-{.compile: srcPath & "c_kzg_4844.c"} | ||
+{.passl: "-L" & rustKzgPath & "target/release" .} | ||
+{.passl: "-l:rust_kzg_constantine.a" .} | ||
+{.passl: "-lm" .} | ||
|
||
{.passc: "-I" & bindingsPath .} | ||
{.passc: "-I" & srcPath .} | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
From c3d4cb77f5a797bd8f454a0d88e034391514ebd7 Mon Sep 17 00:00:00 2001 | ||
From e7d529a9ba017de920555ae9b4ab05a18174cdcf Mon Sep 17 00:00:00 2001 | ||
From: sirse <[email protected]> | ||
Date: Thu, 26 Oct 2023 13:46:19 +0300 | ||
Subject: [PATCH] Patch rust binding | ||
Date: Thu, 25 Jan 2024 11:42:12 +0200 | ||
Subject: [PATCH] Patch rust bindings | ||
|
||
--- | ||
bindings/rust/Cargo.toml | 1 + | ||
bindings/rust/build.rs | 29 +++++------------------------ | ||
2 files changed, 6 insertions(+), 24 deletions(-) | ||
bindings/rust/build.rs | 22 +++------------------- | ||
2 files changed, 4 insertions(+), 19 deletions(-) | ||
|
||
diff --git a/bindings/rust/Cargo.toml b/bindings/rust/Cargo.toml | ||
index ab1f5b8..44e410e 100644 | ||
index 98bd814..9391f27 100644 | ||
--- a/bindings/rust/Cargo.toml | ||
+++ b/bindings/rust/Cargo.toml | ||
@@ -1,3 +1,4 @@ | ||
|
@@ -18,7 +18,7 @@ index ab1f5b8..44e410e 100644 | |
name = "c-kzg" | ||
version = "0.1.0" | ||
diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs | ||
index 692305a..e874ccd 100644 | ||
index 5148333..ec42e21 100644 | ||
--- a/bindings/rust/build.rs | ||
+++ b/bindings/rust/build.rs | ||
@@ -15,24 +15,7 @@ fn main() { | ||
|
@@ -27,7 +27,7 @@ index 692305a..e874ccd 100644 | |
|
||
- let mut cc = cc::Build::new(); | ||
- | ||
- #[cfg(windows)] | ||
- #[cfg(all(windows, target_env = "msvc"))] | ||
- { | ||
- cc.flag("-D_CRT_SECURE_NO_WARNINGS"); | ||
- | ||
|
@@ -47,7 +47,7 @@ index 692305a..e874ccd 100644 | |
|
||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); | ||
let bindings_out_path = out_dir.join("generated.rs"); | ||
@@ -46,14 +29,12 @@ fn main() { | ||
@@ -46,7 +29,8 @@ fn main() { | ||
); | ||
|
||
// Finally, tell cargo this provides ckzg/ckzg_min | ||
|
@@ -56,16 +56,7 @@ index 692305a..e874ccd 100644 | |
+ println!("cargo:rustc-link-arg=-l:rust_kzg_constantine.a"); | ||
} | ||
|
||
-fn make_bindings<P>( | ||
- header_path: &str, | ||
- blst_headers_dir: &str, | ||
- bindings_out_path: P, | ||
-) where | ||
+fn make_bindings<P>(header_path: &str, blst_headers_dir: &str, bindings_out_path: P) | ||
+where | ||
P: AsRef<std::path::Path>, | ||
{ | ||
use bindgen::Builder; | ||
fn make_bindings<P>(header_path: &str, blst_headers_dir: &str, bindings_out_path: P) | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.