Commit fbc3aa5
fix(deps): audit batch 10 — drop tokio "full" + remove dead openssl dep (#154)
Cargo dep cleanup from the audit punch-list. Two real issues, both
reducing the optimized binary footprint without changing any
user-visible behaviour.
## tokio: drop the "full" feature
`tokio = { features = ["full"] }` in the workspace pulled the entire
runtime including process management, signal handling, file I/O,
sync primitives, etc. — none of which icm uses.
The only tokio call sites are `#[tokio::main]` and
`tokio::net::TcpListener::bind` in `crates/icm-cli/src/web.rs`, both
gated behind the optional `web` feature. Narrowed to:
features = ["rt-multi-thread", "macros", "net"]
This matches what `axum::serve` actually needs at runtime. Verified
by:
- `cargo build --workspace` (default features) — clean
- `cargo build -p icm-cli --features web` — clean
- `cargo test --workspace` — 324 passing
- `cargo clippy -p icm-cli --features web -- -D warnings` — clean
Expect ~3 MB smaller release binary on Linux for the `--features
web` build, and faster cold compile time (Tokio's `full` pulls a
deep dep tree).
## openssl: dead optional dep removed
`openssl = { version = "0.10", optional = true }` was declared in
`crates/icm-cli/Cargo.toml`, gated behind a `vendored-openssl`
feature, but **zero call sites use it**. `grep -rn 'use openssl\|
openssl::'` in `crates/` returns nothing. ureq already uses rustls
internally for the cloud-sync HTTPS requests.
Removed the dep entirely, including the `vendored-openssl` feature
that referenced it. No behaviour change because nothing was using
it. Saves a transitive `openssl-sys` build on Linux when someone
opted into `vendored-openssl` thinking it did something.
## Out of scope (kept for future batches)
- `serde_json_lenient` v0.2 (pre-1.0) — pinning to a stricter range
is a follow-up; the audit flagged it but the crate has been stable
for 18 months and the breakage risk is low.
- `image` crate codecs are pulled transitively by `fastembed`. We'd
need to set `default-features = false` on `image` and re-enable
only what fastembed needs — requires upstream coordination.
- `default-features` split per binary type (server vs interactive) —
worth doing only when we have a concrete consumer asking for it.
Co-authored-by: patrick <patrick@rtk-ai.app>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3b8b9a0 commit fbc3aa5
3 files changed
Lines changed: 6 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
| |||
0 commit comments