Open ryansname opened 1 year ago
That circular dependency loop is a good question. Did you manage to wrap your head around it?
I would suggest to try replacing line 1834 in imgui.zig with
UserCallback: ?*anyopaque,
Oh yeah, thanks for the prompt, looks like it might be ziglang/zig#12325.
If I run the tests as zig build test -fstage1
it succeeds, though I have to re-hack that pointer from ~3 to ~7
Zig-ImGui % zig build test -fstage1
All 4 tests passed.
Zig-ImGui % zig version
0.10.0
Zig-ImGui %
yeah it definitely looks like that issue. I am not entirely sure about the alignment issue, though. That's even more obscure to me.
Thanks for publishing this PR, @ryansname! I took this change and updated it to imgui 1.89.4 and updated the bindings here: https://github.com/nurpax/zig-imgui
This adds a sokol gfx backend which is handy for my own projects, thought I'd share the imgui parts for anyone who cares. :)
Changes:
fastmod -e zig '\?fn' '?*const fn'
fastmod -e zig '= fn' '= *const fn'
?[*:0]u8
by printing "null
std.builtin.TypeInfo
withstd.builtin.Type
CallingConvention
appears to be part ofstd.builtin
, not@import("builtin")
@bitCast
with@enumToInt
There's one hack in there because of some new alignment rules that I'm not sure how to avoid:
~3
instead of~0
because of alignment errors I'm not sure this is the correct approach, but the constant should be used by all the in tree examplesIt is also currently unable to run
zig build test
due to the below error which I haven't traced yet either:I am able to run the GLFW example locally, but do not have the Vulkan libraries handy to test that, it compiles but fails to link.
I also was able to use the GLFW example in my local project.