mirror of
https://github.com/allyourcodebase/tracy.git
synced 2026-11-17 01:40:29 +00:00
Tracy ported to the zig build system
- C++ 91.9%
- C 3.4%
- TeX 2.5%
- Python 1.2%
- Fortran 0.4%
- Other 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github | ||
| .omp/skills/tracy-gui-verify | ||
| capture/src | ||
| cmake | ||
| csvexport/src | ||
| doc | ||
| examples | ||
| extra | ||
| icon | ||
| import/src | ||
| include/glad | ||
| manual | ||
| merge/src | ||
| monitor/src | ||
| profiler | ||
| public | ||
| python | ||
| server | ||
| tests | ||
| update/src | ||
| .clang-format | ||
| .clang-tidy | ||
| .gitignore | ||
| .mailmap | ||
| build.zig | ||
| build.zig.zon | ||
| build.zig.zon.nix | ||
| diff.sh | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| NEWS | ||
| README.md | ||
| shell.nix | ||
Tracy Profiler
This is Tracy, packaged for Zig.
Installation
Install Zig 0.17.0 and then run the following command:
zig build install-profiler
./zig-out/bin/tracy-profiler
You can also directly run the Tracy Profiler with the "run" step:
zig build run
System Dependencies
When building for Windows or macOS, no system dependencies are required.
The graphical profiler has the following dependencies on Linux and BSD:
libGL,libGLX: runtime dependencylibEGL: runtime dependency, not required when using-Dlegacylibwayland-*runtime dependencies to run a native wayland sessionlibX*runtime dependencies to run a X11 session, only required when using-Dlegacylibxkbcommon: not required when using-Dlegacylibdbus-1: can be disabled with-Dno-fileselectoror-Dportal=falselibgtk+-3.0: only required when using-Dportal=false
System Integrations
Tracy has been ported with support for Zig's System Integration Options. By default, all system dependencies will be avoided except libxkbcommon.
Cross Compilation
Windows
Cross compiling to windows works out of the box. It can even connect to a client that is running a different host (Linux).
zig build -Dtarget=x86_64-windows
zig build run -Dtarget=x86_64-windows -fwine # run the tracy profiler with Wine
Linux
This will produce a dynamically linked executable that will try to dlopen various runtime libraries. This is not guaranteed to work as all distros like NixOS.
# Wayland
zig build -Dtarget=x86_64-linux-gnu -Dlinkage=dynamic -Dno-fileselector -fno-sys=libxkbcommon -Dxkb-config-root=/usr/share/X11/xkb -Dx-locale-root=/usr/share/X11/locale
# X11
zig build -Dtarget=x86_64-linux-gnu -Dlinkage=dynamic -Dno-fileselector -Dlegacy
FreeBSD
# Wayland
zig build -Dtarget=x86_64-freebsd -Dno-fileselector -fno-sys=libxkbcommon -Dxkb-config-root=/usr/local/share/X11/xkb -Dx-locale-root=/usr/local/lib/X11/locale
# X11
zig build -Dtarget=x86_64-freebsd -Dno-fileselector -Dlegacy
NetBSD
# X11
zig build -Dtarget=x86_64-freebsd -Dno-fileselector
OpenBSD
# X11
zig build -Dtarget=x86_64-freebsd -Dno-fileselector