From 1052ffbcc2902e6087ca01e9796477664c3fa41a Mon Sep 17 00:00:00 2001 From: Denys Mentiei Date: Sun, 28 Jan 2024 13:53:57 +0100 Subject: [PATCH] Fixed `sys` features. Before: `sys` is compiled everytime if any of its features are set (e.g. `no-exit`), even if the main crate is not `enabled`. After: `sys` is built only when the main crate is `enabled`. It requires Rust 1.60, though. --- CHANGELOG.md | 7 ++++++- tracy-gizmos/Cargo.toml | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a16167..08c9f3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed ### Removed -## [Unreleased] - 2024-01-xx +## [Unreleased] - 2024-xx-xx ### Added - `#[capture]` attribute to instrument main added. +### Fixed + +- `sys` is no longer compiled when we are not `enabled`, but some + other features are set (e.g. `no-exit`). + ### Changed - minor example updates diff --git a/tracy-gizmos/Cargo.toml b/tracy-gizmos/Cargo.toml index 4776c2f..db991e5 100644 --- a/tracy-gizmos/Cargo.toml +++ b/tracy-gizmos/Cargo.toml @@ -29,18 +29,18 @@ enabled = ["dep:sys", "only-localhost"] unstable-function-names = [] attributes = ["dep:attrs"] # sys features -crash-handler = ["sys/crash-handler"] -system-tracing = ["sys/system-tracing"] -context-switch = ["sys/context-switch"] -sampling = ["sys/sampling"] -callstack-inlines = ["sys/callstack-inlines"] -hw-counters = ["sys/hw-counters"] -code-transfer = ["sys/code-transfer"] -vsync = ["sys/vsync"] -no-exit = ["sys/no-exit"] -broadcast = ["sys/broadcast"] -only-localhost = ["sys/only-localhost"] -only-ipv4 = ["sys/only-ipv4"] +crash-handler = ["sys?/crash-handler"] +system-tracing = ["sys?/system-tracing"] +context-switch = ["sys?/context-switch"] +sampling = ["sys?/sampling"] +callstack-inlines = ["sys?/callstack-inlines"] +hw-counters = ["sys?/hw-counters"] +code-transfer = ["sys?/code-transfer"] +vsync = ["sys?/vsync"] +no-exit = ["sys?/no-exit"] +broadcast = ["sys?/broadcast"] +only-localhost = ["sys?/only-localhost"] +only-ipv4 = ["sys?/only-ipv4"] [package.metadata.docs.rs] all-features = true