From c79c4be99f4bfa38f2adfe34e6d085eb57dd9f85 Mon Sep 17 00:00:00 2001
From: Luke Curley <kixelated@gmail.com>
Date: Fri, 12 Jun 2026 14:21:33 -0700
Subject: [PATCH] chore(moq-native): remove tokio-console instrumentation

Drops the optional `tokio-console` feature and its `console-subscriber`
dependency from moq-native, along with the demo justfile recipes that
wired it up (TOKIO_CONSOLE_BIND on the relay, `console` recipes on ports
6680/6681). With nothing left requiring it, also remove the
`.cargo/config.toml` that set `--cfg tokio_unstable` repo-wide.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---
 .cargo/config.toml       |   2 -
 Cargo.lock               | 107 +++++++--------------------------------
 demo/pub/justfile        |   4 --
 demo/relay/justfile      |   6 +--
 rs/moq-native/Cargo.toml |   2 -
 rs/moq-native/src/log.rs |   3 --
 6 files changed, 18 insertions(+), 106 deletions(-)
 delete mode 100644 .cargo/config.toml

diff --git a/.cargo/config.toml b/.cargo/config.toml
deleted file mode 100644
index bff29e6e1..000000000
--- a/.cargo/config.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-[build]
-rustflags = ["--cfg", "tokio_unstable"]
diff --git a/Cargo.lock b/Cargo.lock
index d9733d6bf..75617a07a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -329,7 +329,7 @@ version = "0.30.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "16e2cdb6d5ed835199484bb92bb8b3edd526effe995c61732580439c1a67e2e9"
 dependencies = [
- "base64 0.22.1",
+ "base64",
  "http",
  "log",
  "url",
@@ -408,7 +408,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90"
 dependencies = [
  "axum-core",
- "base64 0.22.1",
+ "base64",
  "bytes",
  "form_urlencoded",
  "futures-util",
@@ -516,12 +516,6 @@ version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "fd307490d624467aa6f74b0eabb77633d1f758a7b25f12bceb0b22e08d9726f6"
 
-[[package]]
-name = "base64"
-version = "0.21.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
-
 [[package]]
 name = "base64"
 version = "0.22.1"
@@ -1030,46 +1024,6 @@ dependencies = [
  "crossbeam-utils",
 ]
 
-[[package]]
-name = "console-api"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8599749b6667e2f0c910c1d0dff6901163ff698a52d5a39720f61b5be4b20d3"
-dependencies = [
- "futures-core",
- "prost",
- "prost-types",
- "tonic",
- "tonic-prost",
- "tracing-core",
-]
-
-[[package]]
-name = "console-subscriber"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb4915b7d8dd960457a1b6c380114c2944f728e7c65294ab247ae6b6f1f37592"
-dependencies = [
- "console-api",
- "crossbeam-channel",
- "crossbeam-utils",
- "futures-task",
- "hdrhistogram",
- "humantime",
- "hyper-util",
- "prost",
- "prost-types",
- "serde",
- "serde_json",
- "thread_local",
- "tokio",
- "tokio-stream",
- "tonic",
- "tracing",
- "tracing-core",
- "tracing-subscriber",
-]
-
 [[package]]
 name = "const-hex"
 version = "1.19.1"
@@ -2598,19 +2552,6 @@ dependencies = [
  "foldhash 0.2.0",
 ]
 
-[[package]]
-name = "hdrhistogram"
-version = "7.5.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d"
-dependencies = [
- "base64 0.21.7",
- "byteorder",
- "flate2",
- "nom",
- "num-traits",
-]
-
 [[package]]
 name = "heck"
 version = "0.5.0"
@@ -2923,7 +2864,7 @@ version = "0.1.20"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0"
 dependencies = [
- "base64 0.22.1",
+ "base64",
  "bytes",
  "futures-channel",
  "futures-util",
@@ -3534,7 +3475,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "eba32bfb4ffdeaca3e34431072faf01745c9b26d25504aa7a6cf5684334fc4fc"
 dependencies = [
  "aws-lc-rs",
- "base64 0.22.1",
+ "base64",
  "getrandom 0.2.17",
  "js-sys",
  "pem",
@@ -3972,7 +3913,7 @@ name = "moq-mux"
 version = "0.5.4"
 dependencies = [
  "anyhow",
- "base64 0.22.1",
+ "base64",
  "bytes",
  "futures",
  "h264-parser",
@@ -4007,7 +3948,6 @@ dependencies = [
  "bytes",
  "chrono",
  "clap",
- "console-subscriber",
  "futures",
  "hex",
  "humantime",
@@ -4108,7 +4048,7 @@ version = "0.6.0"
 dependencies = [
  "anyhow",
  "aws-lc-rs",
- "base64 0.22.1",
+ "base64",
  "elliptic-curve",
  "jsonwebtoken",
  "p256",
@@ -4931,7 +4871,7 @@ version = "0.31.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "a7175df06de5eaee9909d4805a3d07e28bb752c34cab57fa9cff549da596b30f"
 dependencies = [
- "base64 0.22.1",
+ "base64",
  "const-hex",
  "opentelemetry",
  "opentelemetry_sdk",
@@ -5049,7 +4989,7 @@ version = "3.0.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be"
 dependencies = [
- "base64 0.22.1",
+ "base64",
  "serde_core",
 ]
 
@@ -5178,7 +5118,7 @@ version = "1.9.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "092791278e026273c1b65bbdcfbba3a300f2994c896bd01ab01da613c29c46f1"
 dependencies = [
- "base64 0.22.1",
+ "base64",
  "indexmap 2.14.0",
  "quick-xml",
  "serde",
@@ -5218,7 +5158,7 @@ version = "0.17.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "aec2a8809e3f7dba624776bb223da9fed49c413c60b3bef21aadcb67a5e35944"
 dependencies = [
- "base64 0.22.1",
+ "base64",
  "bytes",
  "derive_more",
  "hyper-util",
@@ -5471,15 +5411,6 @@ dependencies = [
  "syn 2.0.117",
 ]
 
-[[package]]
-name = "prost-types"
-version = "0.14.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f94967dc7688f3054c7fac87473ffae4cc4c3904800e2d9f5b857246d8963b0a"
-dependencies = [
- "prost",
-]
-
 [[package]]
 name = "qlog"
 version = "0.18.0"
@@ -5823,7 +5754,7 @@ version = "0.12.28"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147"
 dependencies = [
- "base64 0.22.1",
+ "base64",
  "bytes",
  "futures-core",
  "http",
@@ -5861,7 +5792,7 @@ version = "0.13.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3"
 dependencies = [
- "base64 0.22.1",
+ "base64",
  "bytes",
  "futures-core",
  "futures-util",
@@ -6439,7 +6370,7 @@ version = "3.21.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c"
 dependencies = [
- "base64 0.22.1",
+ "base64",
  "bs58",
  "chrono",
  "hex",
@@ -6493,7 +6424,7 @@ version = "0.14.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "0d471eaefb14f4b30032525bdb124b36e55ba9cb1292080e06f1a236cd10fe87"
 dependencies = [
- "base64 0.22.1",
+ "base64",
  "indexmap 2.14.0",
  "ref-cast",
 ]
@@ -7152,7 +7083,6 @@ dependencies = [
  "signal-hook-registry",
  "socket2",
  "tokio-macros",
- "tracing",
  "windows-sys 0.61.2",
 ]
 
@@ -7263,7 +7193,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "dad543404f98bfc969aeb71994105c592acfc6c43323fddcd016bb208d1c65cb"
 dependencies = [
  "aws-lc-rs",
- "base64 0.22.1",
+ "base64",
  "bytes",
  "futures-core",
  "futures-sink",
@@ -7402,10 +7332,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef"
 dependencies = [
  "async-trait",
- "axum",
- "base64 0.22.1",
+ "base64",
  "bytes",
- "h2",
  "http",
  "http-body",
  "http-body-util",
@@ -7414,7 +7342,6 @@ dependencies = [
  "hyper-util",
  "percent-encoding",
  "pin-project",
- "socket2",
  "sync_wrapper",
  "tokio",
  "tokio-stream",
@@ -8698,7 +8625,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "08db1edfb05d9b3c1542e521aea074442088292f00b5f28e435c714a98f85031"
 dependencies = [
  "assert-json-diff",
- "base64 0.22.1",
+ "base64",
  "deadpool",
  "futures",
  "http",
diff --git a/demo/pub/justfile b/demo/pub/justfile
index 3246c3d66..95faac6d7 100644
--- a/demo/pub/justfile
+++ b/demo/pub/justfile
@@ -221,10 +221,6 @@ clock action url="http://localhost:4443" *args:
 
     cargo run -p moq-native --example clock -- --url "{{ url }}" --broadcast "clock" {{ args }} {{ action }}
 
-# Connect tokio-console to the publisher (port 6681).
-console:
-    tokio-console http://127.0.0.1:6681
-
 # --- GStreamer ---
 
 # Publish a video using GStreamer to a relay server.
diff --git a/demo/relay/justfile b/demo/relay/justfile
index 53a8783f4..7b6345680 100644
--- a/demo/relay/justfile
+++ b/demo/relay/justfile
@@ -2,7 +2,7 @@ set fallback
 
 # Run a localhost relay server without authentication.
 default:
-    TOKIO_CONSOLE_BIND=127.0.0.1:6680 cargo run --bin moq-relay -- localhost.toml
+    cargo run --bin moq-relay -- localhost.toml
 
 # Run a cluster of relay servers.
 cluster: token
@@ -87,7 +87,3 @@ token: key
     		--root demo --publish "" \
     		> demo-cli.jwt
     fi
-
-# Connect tokio-console to the relay server (port 6680).
-console:
-    tokio-console http://127.0.0.1:6680
diff --git a/rs/moq-native/Cargo.toml b/rs/moq-native/Cargo.toml
index d5bca2a28..ec0584751 100644
--- a/rs/moq-native/Cargo.toml
+++ b/rs/moq-native/Cargo.toml
@@ -25,12 +25,10 @@ iroh = ["dep:web-transport-iroh", "dep:web-transport-proto"]
 jemalloc = ["dep:tikv-jemallocator", "dep:tikv-jemalloc-ctl"]
 websocket = ["dep:qmux"]
 ring = ["rustls/ring", "rcgen?/ring", "quinn?/rustls-ring"]
-tokio-console = ["dep:console-subscriber"]
 android-logcat = ["dep:tracing-android"]
 
 [dependencies]
 clap = { version = "4", features = ["derive", "env"] }
-console-subscriber = { version = "0.5", optional = true }
 futures = "0.3"
 hex = "0.4"
 humantime = "2.3"
diff --git a/rs/moq-native/src/log.rs b/rs/moq-native/src/log.rs
index d97a3cf35..d0e5bfc9c 100644
--- a/rs/moq-native/src/log.rs
+++ b/rs/moq-native/src/log.rs
@@ -67,9 +67,6 @@ impl Log {
 			registry.with(fmt_layer)
 		};
 
-		#[cfg(feature = "tokio-console")]
-		let registry = registry.with(console_subscriber::spawn());
-
 		registry
 			.try_init()
 			.map_err(|e| crate::Error::SetSubscriber(std::sync::Arc::new(e)))?;
