Skip to content

Commit 2b45cbf

Browse files
authored
Merge pull request #41 from RustedBytes/tracy
enable Tracy on Linux/macOS
2 parents 9840a89 + aecfef5 commit 2b45cbf

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ jobs:
2020
- os_name: linux
2121
runner: ubuntu-latest
2222
rust_target: x86_64-unknown-linux-gnu
23+
maturin_args: "--features profiler"
2324
- os_name: linux-arm64
2425
runner: ubuntu-24.04-arm
2526
rust_target: aarch64-unknown-linux-gnu
27+
maturin_args: "--features profiler"
2628
- os_name: windows-amd64
2729
runner: windows-latest
2830
rust_target: x86_64-pc-windows-msvc
@@ -33,9 +35,11 @@ jobs:
3335
- os_name: macos-intel
3436
runner: macos-15-intel
3537
rust_target: x86_64-apple-darwin
38+
maturin_args: "--features profiler"
3639
- os_name: macos-arm64
3740
runner: macos-15
3841
rust_target: aarch64-apple-darwin
42+
maturin_args: "--features profiler"
3943

4044
steps:
4145
- name: Check out repository
@@ -63,7 +67,7 @@ jobs:
6367
shell: bash
6468
env:
6569
RSLOOP_PYTHON_VERSIONS: ${{ matrix.python_versions }}
66-
run: scripts/build-wheels.sh --out dist --target "${{ matrix.rust_target }}"
70+
run: scripts/build-wheels.sh --out dist --target "${{ matrix.rust_target }}" -- ${{ matrix.maturin_args }}
6771

6872
- name: Upload wheel artifacts
6973
uses: actions/upload-artifact@v4

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,14 @@ finally:
293293
rsloop.stop_profiler()
294294
```
295295

296-
This starts a Tracy client inside the process. Build a release binary, open
297-
`tracy-profiler.exe`, then connect to the running process while the profiled
296+
This starts a Tracy client inside the process. Build a release binary, open the
297+
Tracy desktop profiler, then connect to the running process while the profiled
298298
code is executing.
299299

300-
The current Tracy feature set is aimed at local Windows profiling:
301-
`enable`, `only-localhost`, `sampling`, and `flush-on-exit`. The last one helps
302-
short-lived runs flush data before exit.
300+
Linux and macOS release wheels are built with profiler support enabled. Other
301+
builds still need `--features profiler` when built locally. The Tracy feature
302+
set is aimed at local profiling: `enable`, `only-localhost`, `sampling`, and
303+
`flush-on-exit`. The last one helps short-lived runs flush data before exit.
303304

304305
If the extension was built without `--features profiler`, `profile()` and
305306
`start_profiler()` raise a runtime error.

docs/development.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ Those four questions usually point you to the right part of the codebase.
7373
## Profiling
7474

7575
Profiling support exists behind the Rust `profiler` feature and uses Tracy.
76+
Release wheels for Linux and macOS include this feature; local development
77+
builds need it enabled explicitly.
7678

7779
Example build:
7880

0 commit comments

Comments
 (0)