@@ -16,15 +16,14 @@ pub fn init() !void {
1616 // Start lua
1717 try lua_util .init ();
1818
19- // TODO fix this
2019 // Bind all the libraries using some meta programming magic at compile time
21- // try bindZigLibrary("assets", @import("../api/assets.zig"));
22- // try bindZigLibrary("display", @import("../api/display.zig"));
23- // try bindZigLibrary("draw", @import("../api/draw.zig"));
24- // try bindZigLibrary("text", @import("../api/text.zig"));
25- // try bindZigLibrary("graphics", @import("../api/graphics.zig"));
26- // try bindZigLibrary("input.mouse", @import("../api/mouse.zig"));
27- // try bindZigLibrary("input.keyboard", @import("../api/keyboard.zig"));
20+ try bindZigLibrary ("assets" , @import ("../api/assets.zig" ));
21+ try bindZigLibrary ("display" , @import ("../api/display.zig" ));
22+ try bindZigLibrary ("draw" , @import ("../api/draw.zig" ));
23+ try bindZigLibrary ("text" , @import ("../api/text.zig" ));
24+ try bindZigLibrary ("graphics" , @import ("../api/graphics.zig" ));
25+ try bindZigLibrary ("input.mouse" , @import ("../api/mouse.zig" ));
26+ try bindZigLibrary ("input.keyboard" , @import ("../api/keyboard.zig" ));
2827}
2928
3029pub fn deinit () void {
@@ -45,10 +44,8 @@ fn isModuleFunction(comptime name: [:0]const u8, comptime in_type: anytype) bool
4544
4645fn findLibraryFunctions (comptime module : anytype ) []const ScriptFn {
4746 comptime {
48- const info = @typeInfo (module );
4947 // Get all the public declarations in this module
50- const decls = info .@"struct" .decls ;
51- @compileLog (@typeName (@TypeOf (module )));
48+ const decls = @typeInfo (module ).@"struct" .decls ;
5249 // filter out only the public functions
5350 var gen_fields : []const std.builtin.Type.Declaration = &[_ ]std.builtin.Type.Declaration {};
5451 for (decls ) | d | {
0 commit comments