harn-hostlib 0.8.21

Opt-in code-intelligence and deterministic-tool host builtins for the Harn VM
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
const std = @import("std");

pub fn add(a: i32, b: i32) i32 {
    return a + b;
}

pub fn shout(comptime s: []const u8) []const u8 {
    return s;
}

test "add returns sum" {
    try std.testing.expectEqual(@as(i32, 3), add(1, 2));
}