We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
0 parents commit 1374dcbCopy full SHA for 1374dcb
.gitignore
@@ -0,0 +1,4 @@
1
+*.dll
2
+*.dll.obj
3
+*.lib
4
+*.pdb
requirements.txt
@@ -0,0 +1 @@
+cffi==1.15.1
simple.py
@@ -0,0 +1,14 @@
+from cffi import FFI
+
+cffi = FFI()
+cffi.cdef(
5
+ """
6
+ double sqrt(double x);
7
8
+)
9
10
+import os
11
12
+simple = cffi.dlopen(os.path.abspath("simple.dll"))
13
14
+print(simple.sqrt(2))
simple.zig
@@ -0,0 +1,3 @@
+export fn sqrt(x: f64) f64 {
+ return @sqrt(x);
+}
0 commit comments