-
Notifications
You must be signed in to change notification settings - Fork 40
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
Cargo features user experience #627
Comments
Hmm, I guess they could all be enabled by default, though it really is a lot of code that's being compiled (
Yes there is, it's called |
Oh, I had no idea about the "magic string" Personally I don't mind waiting 9 seconds for something to compile if it saves me 30 minutes of debugging/enabling features. However, I can see how having the capability to turn features on/off is beneficial (especially for libraries). I would expect the linker to remove the unused code but that may not be enabled by default?
I was copy-pasting the Maybe a new section in the main |
I've been thinking about this again, and perhaps it would indeed make sense to make all features be enabled by default, and allowing users to opt out with |
With the I only wish it was more prominently visible in the README so that when I add a crate I can configure it correctly. I started a new project this morning and I had to find this thread 😃 I worry that if everything is enabled by default users (specifically users who depend on objc2-* transitively) will complain about long compile times. |
Yeah, that's part of why I've left this issue open, I still want to improve the docs on this!
That's also a worry of mine, and I know that some people reflexively use |
As I mentioned earlier, excellent work on these libraries and generators!
That said, I find it frustrating to have to specify the feature for every class I want to use (
objc2-metal
has 61 features). Should features be enabled by default and libraries that want to reduce code only specify the functionality they need?I understand that this might be necessary when one crate extends the functionality of another.
Is there a Cargo feature to enable every feature of a crate?
The text was updated successfully, but these errors were encountered: