chore(easytier): gate hotpath-rs 0.19 dependency and off-mode shim

Re-enable the hotpath profiler as an optional dependency gated behind the
 feature (default off). In off builds the crate stays out of the
dependency graph entirely:  plus a local
 module provide no-op // macros so
call sites compile unchanged. Also add a  guarding the
mutual exclusivity of  with the / global
allocators.
This commit is contained in:
fanyang89
2026-07-02 21:19:28 +08:00
parent 7756a15cbe
commit a602125d97
3 changed files with 65 additions and 6 deletions
+11 -6
View File
@@ -58,6 +58,8 @@ chrono = { version = "0.4.37", features = ["serde"] }
guarden = "0.2"
quanta = "0.12"
hotpath = { version = "0.19", default-features = false, optional = true }
delegate = "0.13.5"
itertools = "0.14.0"
@@ -410,11 +412,14 @@ tracing = ["tokio/tracing", "dep:console-subscriber"]
magic-dns = ["dep:hickory-client", "dep:hickory-server"]
faketcp = ["dep:flume"]
zstd = ["dep:zstd"]
# Deprecated: hotpath profiling has been removed. These feature aliases are
# retained as no-ops so existing build scripts using `--features hotpath*`
# continue to work without pulling in any dependencies.
hotpath = []
hotpath-cpu = ["hotpath"]
hotpath-alloc = ["hotpath"]
hotpath = [
"dep:hotpath",
"hotpath/hotpath",
"hotpath/tokio",
"hotpath/parking_lot",
"hotpath/flume",
]
hotpath-cpu = ["hotpath", "hotpath/hotpath-cpu"]
hotpath-alloc = ["hotpath", "hotpath/hotpath-alloc"]
# For Network Extension on macOS
macos-ne = []