mgerb/imguiz
dear_bindings to use imgui (docking branch) in zig
a01329f307fa6067da824de9f587f292d761680b
refs
@cInclude
in ./src/imguiz.zig
module.addCSourceFile
invocations in ./build.zig
imguiz exposes a module that can be used in your project.
zig fetch --save git+https://github.com/mgerb/imguiz
// build.zig
...
const imguiz = b.dependency("imguiz", .{});
exe.root_module.addImport("imguiz", imguiz.module("imguiz"));
...
// main.zig
const std = @import("std");
const imguiz = @import("imguiz").imguiz;
pub fn main() !void {
std.debug.print("{s}\n", .{imguiz.ImGui_GetVersion()});
}
All bindings are in ./generated
. I will update them from the following branches as needed.
nix develop # This is optional if you want to manually install dependencies (zig, python>=3.12, python ply package)
zig build run -Dgenerate
The generator does the following
./tmp
./tmp
./tmp/dear_bindings/BuildAllBindings.sh
./generated
, which can be natively included in zigSee a more in depth example using vulkan-zig in ./example
.
cd example
nix develop # nix package manager makes this easy: https://nixos.org/download/
zig build run
Note: Only tested on NixOS, but should work on any Linux distro with the nix package manager, or the right dependencies installed (zig, vulkan sdk, vulkan validation layers, sdl3).