From f78969ad9870ec7c6915b038521ecf191763c107 Mon Sep 17 00:00:00 2001 From: Petard Jonson <41122242+greenhat616@users.noreply.github.com> Date: Thu, 18 Jul 2024 17:12:03 +0800 Subject: [PATCH] chore: cleanup deps --- .cargo/config.toml | 4 ++ Cargo.lock | 136 +----------------------------------- Cargo.toml | 4 -- nyanpasu_ipc/Cargo.toml | 15 ++-- nyanpasu_service/Cargo.toml | 2 +- 5 files changed, 17 insertions(+), 144 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 6f2f5be..b33aa2a 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,6 @@ [target.'cfg(debug_assertions)'] rustflags = ["--cfg", "tokio_unstable"] + +[alias] +debug-run = "run --features debug" +debug-build = "build --features debug" diff --git a/Cargo.lock b/Cargo.lock index d1da186..84a66f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,7 +243,7 @@ dependencies = [ "sha1", "sync_wrapper 1.0.1", "tokio", - "tokio-tungstenite 0.21.0", + "tokio-tungstenite", "tower", "tower-layer", "tower-service", @@ -1188,12 +1188,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "http-range-header" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a397c49fec283e3d6211adbe480be95aae5f304cfb923e9970e08956d5168a" - [[package]] name = "httparse" version = "1.9.4" @@ -1566,16 +1560,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "mime_guess" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" -dependencies = [ - "mime", - "unicase", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -1690,13 +1674,10 @@ dependencies = [ "simd-json", "thiserror", "tokio", - "tokio-tungstenite 0.23.1", "tokio-util", "tower", - "tower-http", "tracing", "tracing-attributes", - "tracing-futures", "widestring", ] @@ -1732,7 +1713,6 @@ dependencies = [ "tracing-attributes", "tracing-log", "tracing-subscriber", - "whoami", "windows-service", ] @@ -1807,7 +1787,7 @@ dependencies = [ "cfg-if", "libc", "petgraph", - "redox_syscall 0.5.3", + "redox_syscall", "smallvec", "thread-id", "windows-targets 0.52.6", @@ -2009,15 +1989,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.5.3" @@ -2517,19 +2488,7 @@ dependencies = [ "futures-util", "log", "tokio", - "tungstenite 0.21.0", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite 0.23.0", + "tungstenite", ] [[package]] @@ -2592,31 +2551,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tower-http" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" -dependencies = [ - "bitflags 2.6.0", - "bytes", - "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "http-body-util", - "http-range-header", - "httpdate", - "mime", - "mime_guess", - "percent-encoding", - "pin-project-lite", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", -] - [[package]] name = "tower-layer" version = "0.3.2" @@ -2675,16 +2609,6 @@ dependencies = [ "valuable", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - [[package]] name = "tracing-log" version = "0.2.0" @@ -2753,39 +2677,12 @@ dependencies = [ "utf-8", ] -[[package]] -name = "tungstenite" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 1.1.0", - "httparse", - "log", - "rand", - "sha1", - "thiserror", - "utf-8", -] - [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" version = "0.3.15" @@ -2890,12 +2787,6 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" - [[package]] name = "wasm-bindgen" version = "0.2.92" @@ -2950,16 +2841,6 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" -[[package]] -name = "web-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "which" version = "4.4.2" @@ -2972,17 +2853,6 @@ dependencies = [ "rustix", ] -[[package]] -name = "whoami" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" -dependencies = [ - "redox_syscall 0.4.1", - "wasite", - "web-sys", -] - [[package]] name = "widestring" version = "1.1.0" diff --git a/Cargo.toml b/Cargo.toml index 0388c12..e6b6d9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,10 +30,6 @@ tracing-subscriber = { version = "0.3", features = [ tracing-error = "0.2" tracing-log = { version = "0.2" } tracing-appender = { version = "0.2", features = ["parking_lot"] } -opentelemetry = "0.23" -opentelemetry_sdk = "0.23" -opentelemetry-stdout = { version = "0.4", features = ["trace"] } -tracing-opentelemetry = "0.24" futures = "0.3.30" futures-util = "0.3" chrono = { version = "0.4", features = ["serde"] } diff --git a/nyanpasu_ipc/Cargo.toml b/nyanpasu_ipc/Cargo.toml index e25e90c..d18661e 100644 --- a/nyanpasu_ipc/Cargo.toml +++ b/nyanpasu_ipc/Cargo.toml @@ -4,16 +4,19 @@ version = "0.1.0" edition = "2021" [features] -server = ["dep:axum", "dep:axum-extra", "dep:tower", "dep:tower-http", "dep:widestring"] +server = ["dep:axum", "dep:axum-extra", "dep:tower", "dep:widestring"] client = [] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nyanpasu-utils = { workspace = true, default-features = false, features = ["core_manager", "serde"]} +nyanpasu-utils = { workspace = true, default-features = false, features = [ + "core_manager", + "serde", +] } tracing = { workspace = true } tracing-attributes = { workspace = true } -tracing-futures = { workspace = true } +# tracing-futures = { workspace = true } tokio = { workspace = true } tokio-util = { workspace = true, features = ["io-util"] } thiserror = { workspace = true } @@ -23,7 +26,7 @@ interprocess = { version = "2.2.0", features = ["tokio"] } axum = { version = "0.7", features = ["ws"], optional = true } axum-extra = { version = "0.9", features = ["typed-header"], optional = true } tower = { version = "0.4", features = ["util"], optional = true } -tower-http = { version = "0.5", features = ["fs", "trace"], optional = true } +# tower-http = { version = "0.5", features = ["fs", "trace"], optional = true } widestring = { version = "1.1.0", optional = true } hyper = { version = "1", features = ["full"] } http-body-util = "0.1" @@ -32,5 +35,5 @@ simd-json = { workspace = true } futures = { workspace = true } futures-util = { workspace = true } pin-project-lite = "0.2.14" -tokio-tungstenite = "0.23" # Websocket impl -derive_builder = "0.20" \ No newline at end of file +# tokio-tungstenite = "0.23" # Websocket impl +derive_builder = "0.20" diff --git a/nyanpasu_service/Cargo.toml b/nyanpasu_service/Cargo.toml index 2ba0a26..c03c577 100644 --- a/nyanpasu_service/Cargo.toml +++ b/nyanpasu_service/Cargo.toml @@ -39,7 +39,7 @@ tracing-subscriber = { workspace = true, features = [ ] } tracing-attributes.workspace = true service-manager = { git = "https://github.com/greenhat616/service-manager-rs.git" } -whoami = "1" +# whoami = "1" parking_lot = "0.12" constcat = "0.5.0" ctrlc = { version = "3", features = ["termination"] }