Added 'binary' feature to reduce lib dependencies#26
Added 'binary' feature to reduce lib dependencies#26fpagliughi merged 1 commit intofpagliughi:developfrom
Conversation
|
Hey, thanks for the PR. Yeah, I'd be happy to add this sort of thing; I've actually started doing this more and more in my other libraries. But I think we should use a better name for the feature. I've been using the term "utilities" for this. Would that work? (I'm also assuming more will be added in the future, so make it plural and not just "utility"). Then it's a question of whether it's on by default to keep backward compatibility? I'm on the fence about this one. |
|
Oh, and my preferred way to do this at the moment is entirely in Cargo.toml - so no |
|
Thanks for the quick feedback. "utilities" sounds like a fine name. I also much prefer your cargo-only way of handling the feature. Thanks for the suggestion. Regarding if the "utilities" feature is on by default, I wasn't sure either. I slightly lean yes, but don't have a strong opinion. Getting only the necessary dependencies by default would be nice, but there's something beautiful about the simplicity of a working If/when the RFC above is added to |
|
Cool. Yeah, let's keep the feature on by default, at least for now, especially if there's not a good reason to break backward compatibility. That way I can push this out quickly in a minor update without any breaking changes. We can always change our minds in the next major version update. I'll merge this into the repo and have a look at it all over the weekend. There are a few minor updates that have been sitting in the Soon, I'll start on some other, bigger updates. I think. |
|
Nothing that was pending in the |
I have an application which depends on
rust-industrial-ioand I'm looking to improve its build time. I noticed that this crate pulls inclap, but it is only needed foriio_info_rsbinary, and I only depend on the libraries. On my machine this reduces the lib-only build time from ~6.3 to ~5 seconds and removes several dependencies.I'm not sure if this is the best way to separate dependencies by binary vs. library builds. It looks like there is an RFC rust-lang/rfcs#3374 to provide a better way to do this, but I think this is the best that exists right now.