Skip to content

CI hygiene: clippy + dead_code + tighter tokio/hyper features #35

Description

@mack42

Source: Audit findings (LOW)

Two cleanups under one issue:

  1. Lints not enforced. `cargo check` currently reports 8 `dead_code` / unused warnings on main. Add to `src/main.rs`:
    ```rust
    #![warn(dead_code, unused_crate_dependencies)]
    ```
    and a CI step running `cargo clippy --all-targets --all-features -- -D warnings`.

  2. Binary bloat. `tokio = { features = ["full"] }` and `hyper = { features = ["full"] }` pull every optional feature even when unused. Trim to actual needs:

    • tokio: `["rt-multi-thread", "net", "io-util", "sync", "time", "macros", "signal", "fs"]`
    • hyper: `["server", "http1"]` (HTTP/2 not used)

    Run `cargo build --release` before and after to confirm a binary-size reduction; this also speeds up clean builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttier-3Differentiator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions