2 unstable releases

0.11.0 Feb 21, 2024
0.10.0 Jan 16, 2024

#271 in Profiling

Download history 14/week @ 2024-01-16 1/week @ 2024-02-13 135/week @ 2024-02-20 34/week @ 2024-02-27 1/week @ 2024-03-05 2/week @ 2024-03-26 28/week @ 2024-04-02 42/week @ 2024-04-09

72 downloads per month
Used in tracy-gizmos

MIT/Apache

1MB
25K SLoC

C++ 25K SLoC // 0.1% comments Rust 351 SLoC // 0.0% comments

🧰 tracy-gizmos-sys

Latest Version MIT licensed Apache licensed API

Overview

We maintain a carbon copy of Tracy's public part, so we can build it as a static library and also bindgen the low-level bindings based on its public header.

Instead of submodules or manual copying, we are using git-subtree to do this. It worth revisiting this as local checkout and 1 copy command might be easier.

Bindings

Bindings are generated via bindgen and are commited as a src/ part. It allows to build this crate quickly and without LLVM (bindgen requires libclang to do its thing).

When tracy/ is updated, the bindings should be regenerated:

$ cargo clean && cargo build -F bindgen

Initial setup

Just do the following from the git repository root:

# adding tracy remote and checking out its master in a staging branch
$ git remote add -f tracy-upstream git@github.com:wolfpld/tracy.git
$ git checkout -b staging-tracy tracy-upstream/master

# split off a subdirectory 'public' from its master into a separate branch
$ git subtree split --squash -P public --annotate="Tracy: " --rejoin -b tracy-public

# checkout our main and add 'public' parts above to our 'sys/tracy'
$ git checkout main
$ git subtree add -P sys/tracy --squash tracy-public

How to update

Just do the following from the git repository root:

# switch back to the tracy's master and update it
$ git checkout staging-tracy
$ git pull tracy-upstream master

# update the subdirectory branch with changes received above
$ git subtree split -P public --annotate="Tracy: " --rejoin -b tracy-public

# checkout our main and merge new 'public' parts to update our 'sys/tracy'
$ git subtree merge -P sys/tracy --squash tracy-public

License

Licensed under either of

at your option.

Note that the Tracy public part, that this crate uses and embeds, is licensed under the 3-clause BSD license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps