1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Build script for `tokitai`.
//!
//! Forwards compile-time env vars that the `#[tool]` macro reads
//! via `option_env!`. The macro itself lives in `tokitai-macros`
//! which has its own `build.rs`; this script complements that by
//! setting the same flags when the consumer-side crate enables
//! the matching `tokitai` features.
//!
//! Currently:
//!
//! - `trace` feature: forwards `TOKITAI_TRACE=1` so the macro
//! emits `#[tracing::instrument(...)]` on every generated
//! `__call_*` wrapper. Without this script, a consumer who
//! enabled the `trace` feature would still see the macro
//! behave as if the feature were off — because the macro's
//! `option_env!` reads the env var, not the cargo feature.