FalsePattern/zig-tracy
Easy to use bindings for the tracy client C API. Now with GPU, Lock, and fiber support!
refs
Easy to use bindings for the tracy client C API.
See ./example
for how to set up zig-tracy
with a Zig project.
In summary:
zig-tracy
as a dependency in the build.zig.zon
zig-tracy
dependency in build.zig
If your project needs to call tracy functions from multiple DLLs, then you need to build the tracy client as a shared library.
This is accomplished by passing the shared
option, and (if you're using Windows) installing the resulting shared library next to your exe.
const tracy = b.dependency("tracy", .{
.target = target,
.optimize = optimize,
.shared = true,
});
const install_dir = std.Build.Step.InstallArtifact.Options.Dir{ .override = .{ .bin = {} } };
const install_tracy = b.addInstallArtifact(tracy.artifact("tracy"), .{
.dest_dir = install_dir,
.pdb_dir = install_dir,
});
b.getInstallStep().dependOn(&install_tracy.step);
For additional context, see section 2.1.5 of the Tracy manual, "Setup for multi-DLL projects".