summaryrefslogtreecommitdiff
path: root/src/root.zig
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-07-19 00:01:55 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-07-19 00:01:55 +0200
commit5d391ac3c3bf0ffc02e5f6eae00db949810346b3 (patch)
treea086b976b53c8af23b960f57a64f8e66f00c35ed /src/root.zig
downloaduf-5d391ac3c3bf0ffc02e5f6eae00db949810346b3.tar.gz
uf-5d391ac3c3bf0ffc02e5f6eae00db949810346b3.tar.bz2
uf-5d391ac3c3bf0ffc02e5f6eae00db949810346b3.zip
feat: Initial setup
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);
+}