const mod = @import("root.zig"); const Options = mod.Options; const Env = mod.Env; const AnyFuture = Env.AnyFuture; const Function = Env.Function; const Self = @This(); pub inline fn call(self: *Self, env: *Env, args: anytype) AnyFuture { return env.call(bindings.call, .{ self } ++ args); } pub const bindings = struct { pub const call: Function = .from( \\function(target, ...args) { \\ return target(...args); \\} ); }; pub const functions = [_]Function{ bindings.call, }; pub fn global(tag: @EnumLiteral()) Options.Global { return .{ .name = @tagName(tag), .type = *Self }; }