diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 7e2ebc6..0000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,4 +0,0 @@ -# uncomment to use tokio-console - -# [build] -# rustflags = ["--cfg", "tokio_unstable"] diff --git a/Cargo.toml b/Cargo.toml index 0d9bf4e..7b1008c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,6 +47,7 @@ database = ["rusqlite"] dns = [] tor = ["arti-client", "tor-rtcompat"] filter-control = [] +tokio-console = [] [dev-dependencies] corepc-node = { version = "0.5.0", default-features = false, features = [ diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..32b7c82 --- /dev/null +++ b/build.rs @@ -0,0 +1,4 @@ +fn main() { + #[cfg(feature = "tokio-console")] + println!("cargo:rustc-cfg=tokio_unstable"); +} diff --git a/justfile b/justfile index a4717ba..af5ff38 100644 --- a/justfile +++ b/justfile @@ -4,6 +4,10 @@ default: build: cargo build +# Run with the tokio console enabled for verbose debugging. +run-with-console: + cargo run --features tokio-console + check: cargo fmt cargo clippy --all-targets