zig-webgpu-gen

git clone git://git.electrosoup.com/zig-webgpu-gen
Log | Files | Refs

root.zig (382B)


      1 //! By convention, root.zig is the root source file when making a library. If
      2 //! you are making an executable, the convention is to delete this file and
      3 //! start with main.zig instead.
      4 const std = @import("std");
      5 const testing = std.testing;
      6 
      7 pub export fn add(a: i32, b: i32) i32 {
      8     return a + b;
      9 }
     10 
     11 test "basic add functionality" {
     12     try testing.expect(add(3, 7) == 10);
     13 }