Skip to content

Commit cffed46

Browse files
committed
Add initial zig bindings.
1 parent 0438d74 commit cffed46

File tree

8 files changed

+1249
-0
lines changed

8 files changed

+1249
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,6 @@ bindings/node.js
7070
bindings/emscripten
7171
bin/
7272
obj/
73+
74+
zig-out
75+
.zig-cache

bindings/zig/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# blst for [Zig](https://ziglang.org/)
2+
3+
The object-oriented interface is modeled after [C++ interface](../blst.hpp), but for the moment of this writing is a subset of it, sufficient to produce and verify individual signatures.
4+
5+
## Adding dependency to your project
6+
7+
Execute
8+
```
9+
zig fetch --save git+https://github.com/dot-asm/blst#zig-bindings
10+
```
11+
and add an equivalent of the following line to your build.zig prior to `b.installArtifact(exe)`:
12+
```
13+
exe.root_module.addImport("blst", b.dependency("blst", .{}).module("blst"));
14+
```
15+
You should now be able to `@import("blst")` in your application code. The abovementioned fetch command can be used to update the reference.

0 commit comments

Comments
 (0)