This is a standalone version of the Zig compiler's Tracy bindings, including build tooling.
- Add this repo as a dependency:
zig fetch --save git+https://github.com/silversquirl/zig-tracy - Add the tracy module to your executable in your build.zig:
[...] const tracy_dep = b.dependency("tracy", .{ .target = target, .optimize = optimize, .enable = b.option(bool, "tracy", "Enable profiling with Tracy") orelse false, }); exe.root_module.addImport("tracy", tracy_dep.module("tracy")); [...]
- Instrument your code using the
tracymodule, then build with-Dtracy