text editor
git clone https://git.lucas.co/cce-text-editor.git
Drop the unused tokio runtime
main() built a multi-threaded runtime and entered it, but nothing spawned
onto it: 20 parked worker threads for the app's life (46 threads -> 24).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cargo.lock | 109 ------------------------------------------------------------
Cargo.toml | 1 -
src/main.rs | 3 --
3 files changed, 113 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 3135fd8..22c4107 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -297,12 +297,6 @@ dependencies = [
"syn 2.0.119",
]
-[[package]]
-name = "bytes"
-version = "1.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
-
[[package]]
name = "calloop"
version = "0.13.0"
@@ -349,7 +343,6 @@ dependencies = [
"serde",
"serde_json",
"smithay-client-toolkit",
- "tokio",
"wayland-client",
"xkeysym",
]
@@ -1048,15 +1041,6 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
-[[package]]
-name = "lock_api"
-version = "0.4.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
-dependencies = [
- "scopeguard",
-]
-
[[package]]
name = "log"
version = "0.4.33"
@@ -1135,17 +1119,6 @@ dependencies = [
"simd-adler32",
]
-[[package]]
-name = "mio"
-version = "1.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427"
-dependencies = [
- "libc",
- "wasi",
- "windows-sys 0.61.2",
-]
-
[[package]]
name = "naga"
version = "24.0.0"
@@ -1272,29 +1245,6 @@ version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"
-[[package]]
-name = "parking_lot"
-version = "0.12.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
-dependencies = [
- "lock_api",
- "parking_lot_core",
-]
-
-[[package]]
-name = "parking_lot_core"
-version = "0.9.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
-dependencies = [
- "cfg-if",
- "libc",
- "redox_syscall",
- "smallvec",
- "windows-link",
-]
-
[[package]]
name = "percent-encoding"
version = "2.3.2"
@@ -1506,15 +1456,6 @@ dependencies = [
"font-types",
]
-[[package]]
-name = "redox_syscall"
-version = "0.5.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
-dependencies = [
- "bitflags 2.13.1",
-]
-
[[package]]
name = "resvg"
version = "0.41.0"
@@ -1654,12 +1595,6 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
-[[package]]
-name = "scopeguard"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
-
[[package]]
name = "self_cell"
version = "1.3.0"
@@ -1816,16 +1751,6 @@ dependencies = [
"xkeysym",
]
-[[package]]
-name = "socket2"
-version = "0.6.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4"
-dependencies = [
- "libc",
- "windows-sys 0.61.2",
-]
-
[[package]]
name = "spirv"
version = "0.3.0+sdk-1.3.268.0"
@@ -2048,34 +1973,6 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
-[[package]]
-name = "tokio"
-version = "1.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed"
-dependencies = [
- "bytes",
- "libc",
- "mio",
- "parking_lot",
- "pin-project-lite",
- "signal-hook-registry",
- "socket2",
- "tokio-macros",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "tokio-macros"
-version = "2.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6328af13490e73a9b4694030fafd93f8c8c6a9dede33e821c3fc63eddf8042ba"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
[[package]]
name = "toml_datetime"
version = "1.1.1+spec-1.1.0"
@@ -2295,12 +2192,6 @@ version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
-[[package]]
-name = "wasi"
-version = "0.11.1+wasi-snapshot-preview1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
-
[[package]]
name = "wasip2"
version = "1.0.4+wasi-0.2.12"
diff --git a/Cargo.toml b/Cargo.toml
index 264fabf..31c42ed 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,6 +10,5 @@ calloop = "0.13.0"
calloop-wayland-source = "0.3.0"
wayland-client = { version = "0.31", features = ["system"] }
xkeysym = "0.2"
-tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
diff --git a/src/main.rs b/src/main.rs
index 909b745..f9014de 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -672,8 +672,5 @@ impl TextEditorApp {
}
fn main() {
- let rt = tokio::runtime::Runtime::new().expect("tokio runtime");
- let _guard = rt.enter();
-
cce_ui::engine::run::<TextEditorApp>();
}