From aecfef5a2b7010388913de6a2a943e42ac777214 Mon Sep 17 00:00:00 2001 From: Yehor Smoliakov Date: Thu, 14 May 2026 14:58:04 +0000 Subject: [PATCH] enable Tracy on Linux/macOS --- .github/workflows/wheels.yml | 6 +++++- README.md | 11 ++++++----- docs/development.md | 2 ++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 1228b1d..7e9c8bd 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -20,9 +20,11 @@ jobs: - os_name: linux runner: ubuntu-latest rust_target: x86_64-unknown-linux-gnu + maturin_args: "--features profiler" - os_name: linux-arm64 runner: ubuntu-24.04-arm rust_target: aarch64-unknown-linux-gnu + maturin_args: "--features profiler" - os_name: windows-amd64 runner: windows-latest rust_target: x86_64-pc-windows-msvc @@ -33,9 +35,11 @@ jobs: - os_name: macos-intel runner: macos-15-intel rust_target: x86_64-apple-darwin + maturin_args: "--features profiler" - os_name: macos-arm64 runner: macos-15 rust_target: aarch64-apple-darwin + maturin_args: "--features profiler" steps: - name: Check out repository @@ -63,7 +67,7 @@ jobs: shell: bash env: RSLOOP_PYTHON_VERSIONS: ${{ matrix.python_versions }} - run: scripts/build-wheels.sh --out dist --target "${{ matrix.rust_target }}" + run: scripts/build-wheels.sh --out dist --target "${{ matrix.rust_target }}" -- ${{ matrix.maturin_args }} - name: Upload wheel artifacts uses: actions/upload-artifact@v4 diff --git a/README.md b/README.md index dc0b12e..d533166 100644 --- a/README.md +++ b/README.md @@ -293,13 +293,14 @@ finally: rsloop.stop_profiler() ``` -This starts a Tracy client inside the process. Build a release binary, open -`tracy-profiler.exe`, then connect to the running process while the profiled +This starts a Tracy client inside the process. Build a release binary, open the +Tracy desktop profiler, then connect to the running process while the profiled code is executing. -The current Tracy feature set is aimed at local Windows profiling: -`enable`, `only-localhost`, `sampling`, and `flush-on-exit`. The last one helps -short-lived runs flush data before exit. +Linux and macOS release wheels are built with profiler support enabled. Other +builds still need `--features profiler` when built locally. The Tracy feature +set is aimed at local profiling: `enable`, `only-localhost`, `sampling`, and +`flush-on-exit`. The last one helps short-lived runs flush data before exit. If the extension was built without `--features profiler`, `profile()` and `start_profiler()` raise a runtime error. diff --git a/docs/development.md b/docs/development.md index 2625b22..e39d814 100644 --- a/docs/development.md +++ b/docs/development.md @@ -73,6 +73,8 @@ Those four questions usually point you to the right part of the codebase. ## Profiling Profiling support exists behind the Rust `profiler` feature and uses Tracy. +Release wheels for Linux and macOS include this feature; local development +builds need it enabled explicitly. Example build: