// Generated by tools/gen.zig, do not edit. const std = @import("std"); const abi = @import("../abi.zig"); const host = @import("host.zig"); const types = @import("types.zig"); const guest = @import("guest.zig"); pub fn start(comptime impl: fn (host.Canvas) abi.Result(void, []const u8)) void { const glue = struct { fn call(p0: i32) callconv(.c) i32 { const args = abi.liftArgs(std.meta.ArgsTuple(@TypeOf(impl)), .{p0}); return abi.lowerReturn(abi.Result(void, []const u8), @call(.auto, impl, args)); } fn post(_: i32) callconv(.c) void { abi.endCall(); } }; @export(&glue.call, .{ .name = "start" }); @export(&glue.post, .{ .name = "cabi_post_start" }); } pub fn measure(comptime impl: fn (types.Shape, types.Pair) f32) void { const glue = struct { fn call(p0: i32, p1: i32, p2: i32, p3: i32, p4: f64) callconv(.c) f32 { const args = abi.liftArgs(std.meta.ArgsTuple(@TypeOf(impl)), .{ p0, p1, p2, p3, p4 }); defer abi.endCall(); return abi.lowerReturn(f32, @call(.auto, impl, args)); } }; @export(&glue.call, .{ .name = "measure" }); } pub fn stop(comptime impl: fn () void) void { const glue = struct { fn call() callconv(.c) void { const args = abi.liftArgs(std.meta.ArgsTuple(@TypeOf(impl)), .{}); defer abi.endCall(); return abi.lowerReturn(void, @call(.auto, impl, args)); } }; @export(&glue.call, .{ .name = "stop" }); } pub fn describe(comptime impl: fn () guest.Point) void { const glue = struct { fn call() callconv(.c) i32 { const args = abi.liftArgs(std.meta.ArgsTuple(@TypeOf(impl)), .{}); return abi.lowerReturn(guest.Point, @call(.auto, impl, args)); } fn post(_: i32) callconv(.c) void { abi.endCall(); } }; @export(&glue.call, .{ .name = "demo:gen/guest@1.2.0#describe" }); @export(&glue.post, .{ .name = "cabi_post_demo:gen/guest@1.2.0#describe" }); }