Skip to main content

tracy_client_sys/
lib.rs

1//! The Tracy Client and its low level API
2//!
3//! This crate embeds the C++ Tracy client library and exposes its API. For a higher-level API
4//! consider the `tracy-client` crate.
5//!
6//! # Important note
7//!
8//! Depending on the configuration Tracy may broadcast discovery packets to the local network and
9//! expose the data it collects in the background to that same network. Traces collected by Tracy
10//! may include source and assembly code as well.
11//!
12//! As thus, you may want make sure to only enable the `tracy-client-sys` crate conditionally, via
13//! the `enable` feature flag provided by this crate.
14//!
15//! In order to start tracing it is important that you first call the [`___tracy_startup_profiler`]
16//! function first to initialize the client. The [`___tracy_shutdown_profiler`] must not be called
17//! until it is guaranteed that there will be no more calls to any other Tracy APIs. This can be
18//! especially difficult to ensure if you have detached threads.
19//!
20//! # Features
21//!
22//! The following crate features are provided to customize the functionality of the Tracy client:
23//!
24#![doc = include_str!("../FEATURES.mkd")]
25#![allow(
26    non_snake_case,
27    non_camel_case_types,
28    non_upper_case_globals,
29    unused_variables,
30    deref_nullptr
31)]
32
33#[cfg(feature = "enable")]
34mod generated;
35#[cfg(feature = "enable")]
36pub use generated::*;
37
38#[cfg(all(feature = "enable", feature = "ondemand"))]
39mod generated_on_demand;
40#[cfg(all(feature = "enable", feature = "ondemand"))]
41pub use generated_on_demand::*;
42
43#[cfg(all(feature = "enable", not(feature = "ondemand")))]
44mod generated_not_on_demand;
45#[cfg(all(feature = "enable", not(feature = "ondemand")))]
46pub use generated_not_on_demand::*;
47
48#[cfg(all(feature = "enable", feature = "manual-lifetime"))]
49mod generated_manual_lifetime;
50#[cfg(all(feature = "enable", feature = "manual-lifetime"))]
51pub use generated_manual_lifetime::*;
52
53#[cfg(all(feature = "enable", feature = "fibers"))]
54mod generated_fibers;
55#[cfg(all(feature = "enable", feature = "fibers"))]
56pub use generated_fibers::{___tracy_fiber_enter, ___tracy_fiber_leave};
57
58#[cfg(all(feature = "enable", target_os = "windows"))]
59mod dbghelp;