C# interface
This commit is contained in:
parent
c56461e3a5
commit
bc89288ca7
|
@ -0,0 +1,11 @@
|
|||
INCLUDE_DIRS = .. ../../min-src ../../inc
|
||||
|
||||
test: tests.cs ckzg.dll.so
|
||||
mcs -langversion:5 -optimize+ tests.cs ckzg.cs -r:System.Numerics.dll
|
||||
./tests.exe
|
||||
|
||||
ckzg.dll.so: c_kzg_4844_wrap.c ../../min-src/c_kzg_4844.o ../../lib/libblst.a
|
||||
clang -O -Wall -shared -fPIC -Wl,-Bsymbolic -I${INCLUDE_PY} ${addprefix -I,${INCLUDE_DIRS}} -o $@ $^
|
||||
|
||||
c_kzg_4844_wrap.c ckzg.cs: ../c_kzg_4844.swg
|
||||
swig -DSWIGWORDSIZE64 -O -Wall -csharp -outcurrentdir -namespace ckzg -outfile ckzg.cs $<
|
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
using ckzg;
|
||||
|
||||
class PoC {
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("OK");
|
||||
}
|
||||
}
|
|
@ -77,6 +77,7 @@
|
|||
%include "../min-src/c_kzg_4844.h"
|
||||
%include "../inc/blst.h"
|
||||
|
||||
#if defined(SWIGPYTHON)
|
||||
%pythoncode %{
|
||||
# Helper functions
|
||||
|
||||
|
@ -121,3 +122,4 @@ def _frompybytes(b):
|
|||
|
||||
bytes.frompybytes = _frompybytes
|
||||
%}
|
||||
#endif
|
Loading…
Reference in New Issue