This repository provides Zig language bindings for the Tracy Profiler.
Make sure you have installed Zigmod.
Run
cd example
zigmod fetch
zig build run -Dtracy -Drelease-fast
to execute the example program.
You can also override the default call stack capture depth:
zig build run -Dtracy -Dtracy-depth=10 -Drelease-fast
To integrate Tracy in your project:
-
Add this repository as a dependency to your project:
# <...> root_dependencies: - src: git https://github.com/paveloom-f/zig-tracy-bindings
-
Edit your build script (see the example build script);
-
Add Tracy calls in your source code (see the example program);
This is mostly a fork of Martin Wickham's version with a bit of extra niceties (like an allocator wrapper) from the Zig's version of the bindings. Also, Meghan's version showed how to integrate with Zigmod.