Skip to content

Commit 337fb9a

Browse files
committed
build: migrate tokio console control to build.rs
Instead of relying on dirty-ing a checked in file (.cargo/config.toml), switch to a feature flag based flow to enable the tokio debug console. This avoids accidental thrashing in the checked in file. It also allows a discoverable path from the justfile for new developers.
1 parent 807b980 commit 337fb9a

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.cargo/config.toml

Lines changed: 0 additions & 4 deletions
This file was deleted.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ database = ["rusqlite"]
4747
dns = []
4848
tor = ["arti-client", "tor-rtcompat"]
4949
filter-control = []
50+
tokio-console = []
5051

5152
[dev-dependencies]
5253
corepc-node = { version = "0.5.0", default-features = false, features = [

build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
#[cfg(feature = "tokio-console")]
3+
println!("cargo:rustc-cfg=tokio_unstable");
4+
}

justfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ default:
44
build:
55
cargo build
66

7+
# Run with the tokio console enabled for verbose debugging.
8+
run-with-console:
9+
cargo run --features tokio-console
10+
711
check:
812
cargo fmt
913
cargo clippy --all-targets

0 commit comments

Comments
 (0)