Skip to content

Commit

Permalink
Fix c#, go bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtiomTr committed Oct 23, 2024
1 parent b1c4314 commit 661d1d3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
25 changes: 17 additions & 8 deletions blst/csharp.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
From f9014c924b5dc0083f0aabaf91fcd38be6518b8e Mon Sep 17 00:00:00 2001
From 5b1ad0fd02016130dcfea5a7e84dcf4de2c67a43 Mon Sep 17 00:00:00 2001
From: sirse <artiom.tretjakovas2@gmail.com>
Date: Wed, 2 Oct 2024 07:33:45 +0000
Subject: [PATCH] Patch C# binding
Date: Wed, 23 Oct 2024 11:13:11 +0000
Subject: [PATCH] Patch C# bindings

---
bindings/csharp/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
bindings/csharp/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bindings/csharp/Makefile b/bindings/csharp/Makefile
index df1730c..6b5bc2f 100644
index df1730c..f115db1 100644
--- a/bindings/csharp/Makefile
+++ b/bindings/csharp/Makefile
@@ -39,7 +39,7 @@ else
endif

INCLUDE_DIRS = ../../src ../../blst/bindings
-TARGETS = ckzg_wrap.c ../../src/ckzg.c ../../blst/$(BLST_OBJ)
+TARGETS = ckzg_wrap.c ../../lib/librust_kzg_blst.a
+TARGETS = ckzg_wrap.c

CFLAGS += -O2 -Wall -Wextra -shared
CFLAGS += ${addprefix -I,${INCLUDE_DIRS}}
@@ -58,7 +58,7 @@ blst:

.PHONY: ckzg
ckzg: blst
- $(CLANG_EXECUTABLE) $(CFLAGS) -o $(CKZG_LIBRARY_PATH) $(TARGETS)
+ $(CLANG_EXECUTABLE) $(CFLAGS) -o $(CKZG_LIBRARY_PATH) $(TARGETS) -L ../../lib -lrust_kzg_blst -u verify_cell_kzg_proof_batch

.PHONY: ckzg-dotnet
ckzg-dotnet: ckzg
--
2.46.1
2.47.0

4 changes: 2 additions & 2 deletions blst/go.patch
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ index c912d09..edcc96f 100644
+// #define BYTES_PER_G2 96
+// #endif
+// #include <stdlib.h>
+// #include "c_kzg_4844.h"
+// #cgo LDFLAGS: -L${SRCDIR}/../../target/release -lrust_kzg_blst -lm
+// #include "ckzg.h"
+// #cgo LDFLAGS: -L${SRCDIR}/../../lib -lrust_kzg_blst -lm
import "C"

import (
Expand Down
2 changes: 0 additions & 2 deletions run-c-kzg-4844-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,9 @@ cd ../..

print_msg "Patching rust binding"
git apply < ../rust.patch
cd bindings/rust || exit

print_msg "Running rust tests"
cargo test --release
cd ../..

print_msg "Rebuilding blst"
cd src
Expand Down

0 comments on commit 661d1d3

Please sign in to comment.