-
Notifications
You must be signed in to change notification settings - Fork 5
Reduce binary size by removing unused features in our dependencies #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughDisabled default features for many dependencies across three crates and adjusted feature lists (notably changing Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Oopsie, I might have removed rustls-tls on accident from reqwest ~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
ascii-linker/Cargo.toml(1 hunks)asciic/Cargo.toml(1 hunks)libasciic/Cargo.toml(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-21T02:30:20.833Z
Learnt from: S0raWasTaken
Repo: S0raWasTaken/bad_apple PR: 25
File: asciic/Cargo.toml:5-5
Timestamp: 2025-11-21T02:30:20.833Z
Learning: The bad_apple repository requires MSRV 1.88.0 as determined by cargo-msrv. Lower versions are not supported due to specific features, APIs, or dependencies used in the codebase.
Applied to files:
ascii-linker/Cargo.tomlasciic/Cargo.toml
📚 Learning: 2025-11-20T03:04:36.270Z
Learnt from: S0raWasTaken
Repo: S0raWasTaken/bad_apple PR: 23
File: asciic/src/installer.rs:1-5
Timestamp: 2025-11-20T03:04:36.270Z
Learning: In asciic/src/installer.rs (bad_apple repository), the maintainer prefers using `#![allow(unreachable_code, unused_variables)]` with runtime `std::process::exit` calls to handle unsupported platforms, rather than compile-time `#[cfg(...)]` guards, trusting the Rust compiler to optimize away unreachable code paths.
Applied to files:
asciic/Cargo.toml
🔇 Additional comments (3)
ascii-linker/Cargo.toml (1)
20-23: No concerns; dependency feature disabling looks appropriate for a proc-macro library.These changes disable unnecessary default features without removing needed functionality. The crate should continue to work correctly.
asciic/Cargo.toml (1)
12-12: No action needed. The asciic source code does not use clap derive macros (#[derive(Parser)],#[derive(Subcommand)], etc.), so removing the "derive" feature is a valid optimization for this binary crate.libasciic/Cargo.toml (1)
21-21: No breaking change present—clap derive feature was never part of libasciic's public API.The clap optional feature in libasciic (line 17) simply re-exports the clap crate as
["dep:clap"]without forwarding specific features. Libasciic's source code does not use clap at all, so removing the derive feature is not a breaking change to the library's API. Consumers needing clap's derive support can specify it directly in their own dependency declarations.Likely an incorrect or invalid review comment.
|
Closing it for now, it's not really important right now. I'll redo this later. |
Dependencies and their removed features by Workspace:
ascii-linker
default-features = falsedefault-features = falsedefault-features = falsexattr(extended file attributes)default-features = falseasciic
features = ["derive", "cargo"]tofeatures = ["cargo"], default-features = falsederivefeatureanstream(ANSI streams),strsim(string similarity)default-features = falseterminationfeature was already removeddefault-features = falsefeatures = ["rustls-tls", "blocking"]tofeatures = ["blocking"], default-features = falserustls-tls,native-tls,hyper-rustls,hyper-tls,quinn(QUIC),h2(HTTP/2),tokio-rustls,tokio-native-tlsdefault-features = falsedefault-features = falsederivefeaturedefault-features = falsexattr(extended file attributes)default-features = falsedefault-features = falsedefault-features = falseunicode-widthlibasciic
features = ["derive"]todefault-features = falsederivefeature,anstream,strsimbplay (submodule)
Dependencies
features = ["cargo", "derive"]tofeatures = ["derive", "std", "cargo"], default-features = falsestdfeature (explicitly enabled)anstream,strsimfeatures = ["mp3", "playback"]tofeatures = ["playback", "symphonia-mp3"]mp3featuresymphonia-mp3feature (different MP3 decoder)default-features = falsedefault-features = falsederivefeaturedefault-features = falsexattr(extended file attributes)default-features = false