3 ms·
Do we know if this means the Reflection as mentioned in the article via @typeInfo will no longer work? or was it anyway comptime info? My Zig so far has been S
by whitehexagon 2y ago
Do we know if this means the Reflection as mentioned in the article via @typeInfo will no longer work? or was it anyway comptime info? My Zig so far has been SoC level stuff, but using something like raylib or glfw is somewhere on my todo list, and this example sounds mighty useful. Anyway seems a strange thing to remove when Zig has the potential to be the new C. Hopefully also as stable for the next 30 years :)
- pbaam 2y agoIt will still work. If you look at the type signature of @cImport in the language reference[1], it returns a type just as @import. So you can call @typeInfo on it. But instead of writing const win32 = @cImport({ @cInclude("windows.h"); @cInclude("winuser.h"); }); You will write: const win32 = @import("win32"); Where the module "win32" is declared in build.zig. [1] https://ziglang.org/documentation/master/#cImport https://ziglang.org/documentation/master/#cImport