aboutsummaryrefslogtreecommitdiff
path: root/src/root.zig
diff options
context:
space:
mode:
authorjjanzen <jjanzen@jjanzen.ca>2025-01-20 17:30:19 -0600
committerjjanzen <jjanzen@jjanzen.ca>2025-01-20 17:30:19 -0600
commit706dfc3b9fc2aef2427fda5e40c2d5dae9e894b1 (patch)
tree6ca7ad16acb82344ce80d88dfb948f6dc536032b /src/root.zig
parent3cd1ec2279e98f9569587b38008ad0011f97e602 (diff)
start migration to zig
Diffstat (limited to 'src/root.zig')
-rw-r--r--src/root.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/root.zig b/src/root.zig
new file mode 100644
index 0000000..ecfeade
--- /dev/null
+++ b/src/root.zig
@@ -0,0 +1,10 @@
+const std = @import("std");
+const testing = std.testing;
+
+export fn add(a: i32, b: i32) i32 {
+ return a + b;
+}
+
+test "basic add functionality" {
+ try testing.expect(add(3, 7) == 10);
+}