-
-
Notifications
You must be signed in to change notification settings - Fork 51
feat: trim dependencies #338
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
base: master
Are you sure you want to change the base?
Conversation
|
Also to note - Having read through the documentation for |
|
I also plan on submitting some changes that; for the most part, should allow removing a large portion of the |
a963df1 to
f639ea6
Compare
Commit also contains generalized cleanup of the Cargo.toml file plus dep opts. Improves readability and build times.
Removes nesting and moves certain dependencies
inside platform-specific cfg! macro blocks.
note: `if cfg!(..)` doesn't remove code at comp,
where as `#[cfg(..)] { ... }` does.
This is why the usage of it over the former
f639ea6 to
6efa19a
Compare
|
If there's anything else in this one you're wanting to revise @MordechaiHadad , please let me know. |
Summary
Refactoring section
cfg-ifandrand, preferring the use of (already available) cfg decorator for relevant function(s).erase_handler.rsthat was originally double-nested behind macro checks is now a single flat function call.install_handler.rsnow handles the multiple repeat calls with the sameErrreturns via an inline async closure.Command::new(..)calls forgitactions are now handled in theremote_checks(..)function, which has also had a#[rustfmt::skip]macro applied to it to lessen the effect of large method chaining that's mostly non-relevant to understand the function call use-case.Cargo section
Cargo.tomlby using the standard syntax that almost all Rust projects use for declaring dependencies.optional = falseclauses fromCargo.toml[profile.<profile>.package."*"]and came to the conclusion that it's a marginal improvement to provide correct build instructions for project's dependencies - These each align withdebug,release, and your custom one ofoptimized(for size).[[bin]]block to top so other Rust developers can easily locate the required bin file,binstallcalls remain at the bottom as they're unlikely to need to be changed or sought after.Benefits
optimizedprofile.