No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-03 16:48:31 +02:00
.github/workflows update ci 2026-02-04 22:26:29 +01:00
example update ci 2026-02-04 22:26:29 +01:00
src cleanup build.zig and fixes 2026-02-05 18:27:13 +01:00
vendor/tracy feat: update to tracy 0.13.1 2026-02-04 17:42:46 +11:00
.gitignore init 2025-03-23 00:33:48 +01:00
build.zig update to zig 0.17.0 2026-10-03 16:48:31 +02:00
build.zig.zon update to zig 0.17.0 2026-10-03 16:48:31 +02:00
LICENSE init 2025-03-23 00:33:48 +01:00
README.md cleanup build.zig and fixes 2026-02-05 18:27:13 +01:00

zig-tracy

Library for instrumenting zig code for Tracy 0.13.1.

how to use

  1. Add tracy to the dependency list in build.zig.zon:
zig fetch --save git+https://github.com/johan0A/zig-tracy
  1. Config build.zig:
const tracy = b.dependency("tracy", .{
    .enable_tracy = b.option(bool, "enable_tracy", "Enable Tracy profile markers") orelse false,
    .enable_fibers = b.option(bool, "enable_fibers", "Enable Tracy fiber support") orelse false,
    .on_demand = b.option(bool, "on_demand", "Build tracy with TRACY_ON_DEMAND") orelse false,
    .default_callstack_depth = b.option(u32, "default_callstack_depth", "sets TRACY_CALLSTACK to the depth provided") orelse 0,
});
root_module.addImport("tracy", tracy.module("tracy"));
  1. Add markers to your code:
fn baz() void {
    const zone = tracy.zone(@src());
    defer zone.end();
    foo();
    bar();
}

see more in depth example in the example directory.