diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 5255e41..4c3ba5d 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -74,7 +74,15 @@ jobs: npm install npm run build popd - cargo build --bin rayhunter-daemon --target armv7-unknown-linux-musleabihf --profile=firmware --no-default-features --features ${{ matrix.device.name }} + # Run with -p so that cargo will select the minimum feature set for this package. + # + # Otherwise, it will consider the union of all requested features + # from all packages in the workspace. For example, if installer + # requires tokio with "full" feature, it will be included no matter + # what the feature selection in rayhunter-daemon is. + # + # https://github.com/rust-lang/cargo/issues/4463 + cargo build -p rayhunter-daemon --bin rayhunter-daemon --target armv7-unknown-linux-musleabihf --profile=firmware --no-default-features --features ${{ matrix.device.name }} - uses: actions/upload-artifact@v4 with: name: rayhunter-daemon-${{ matrix.device.name }} diff --git a/Cargo.lock b/Cargo.lock index 8f9cfb8..ba94513 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -944,7 +944,6 @@ checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", - "futures-executor", "futures-io", "futures-sink", "futures-task", @@ -967,17 +966,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - [[package]] name = "futures-io" version = "0.3.31" @@ -1026,13 +1014,10 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ - "futures-channel", "futures-core", - "futures-io", "futures-macro", "futures-sink", "futures-task", - "memchr", "pin-project-lite", "pin-utils", "slab", @@ -2328,9 +2313,7 @@ dependencies = [ "chrono", "crc", "deku", - "env_logger 0.10.2", "futures", - "futures-core", "libc", "log", "nix", @@ -2348,9 +2331,8 @@ dependencies = [ "axum", "chrono", "clap", - "env_logger 0.10.2", + "env_logger 0.11.8", "futures", - "futures-core", "futures-macro", "image", "include_dir", diff --git a/bin/Cargo.toml b/bin/Cargo.toml index f159147..3900087 100644 --- a/bin/Cargo.toml +++ b/bin/Cargo.toml @@ -22,20 +22,19 @@ path = "src/check.rs" rayhunter = { path = "../lib" } toml = "0.8.8" serde = { version = "1.0.193", features = ["derive"] } -tokio = { version = "1.44.2", features = ["full"] } -axum = "0.8" -futures-core = "0.3.30" +tokio = { version = "1.44.2", default-features = false, features = ["fs", "signal", "process", "rt-multi-thread"] } +axum = { version = "0.8", default-features = false, features = ["http1", "tokio", "json"] } thiserror = "1.0.52" libc = "0.2.150" log = "0.4.20" -env_logger = "0.10.1" +env_logger = { version = "0.11", default-features = false } tokio-util = { version = "0.7.10", features = ["rt", "io"] } futures-macro = "0.3.30" include_dir = "0.7.3" mime_guess = "2.0.4" chrono = { version = "0.4.31", features = ["serde"] } -tokio-stream = "0.1.14" -futures = "0.3.30" +tokio-stream = { version = "0.1.14", default-features = false } +futures = { version = "0.3.30", default-features = false } clap = { version = "4.5.2", features = ["derive"] } serde_json = "1.0.114" image = { version = "0.25.1", default-features = false, features = ["png", "gif"] } diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 5fe8d77..8d39d55 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -19,14 +19,12 @@ bytes = "1.5.0" chrono = "0.4.31" crc = "3.0.1" deku = { version = "0.18.0", features = ["logging"] } -env_logger = "0.10.1" libc = "0.2.150" log = "0.4.20" nix = { version = "0.29.0", features = ["feature"] } pcap-file-tokio = "0.1.0" thiserror = "1.0.50" telcom-parser = { path = "../telcom-parser" } -tokio = { version = "1.44.2", features = ["full"] } -futures-core = "0.3.30" -futures = "0.3.30" +tokio = { version = "1.44.2", default-features = false } +futures = { version = "0.3.30", default-features = false } serde = { version = "1.0.197", features = ["derive"] } diff --git a/lib/src/diag_device.rs b/lib/src/diag_device.rs index 1bec4ba..8693233 100644 --- a/lib/src/diag_device.rs +++ b/lib/src/diag_device.rs @@ -6,7 +6,7 @@ use crate::hdlc::hdlc_encapsulate; use crate::log_codes; use deku::prelude::*; -use futures_core::TryStream; +use futures::TryStream; use log::{error, info}; use std::io::ErrorKind; use std::os::fd::AsRawFd;