-
Notifications
You must be signed in to change notification settings - Fork 950
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
Don't build secp256k1 by default. #2146
Conversation
Personally, I always use |
8cc0080
to
825220a
Compare
I am fine with removing
I see the |
That works if your crate is the only one pulling in libp2p. The annoying thing is that once turned on, features in a dependency graph can never be turned off again. Thus, if you are pulling in a dependency that already depends on libp2p and that dependency did not turn off all default features, you are somewhat screwed. Now, how often this case happens is debatable :) But by having all features turned off by default, this is much less likely to happen. I really like how Regarding batteries included: The batteries are still there, you just need to plug them in :P There is certainly potential for making things easier for newcomers. Cargo features and conditional compilation are a fact of life in the Rust world though, it is not like At the risk of derailing the discussion completely: One thing that IMO we could do much better at is supporting different executors. For example, at the moment it possible to use |
I agree with @thomaseizinger, although I think this would already be an improvement as it pulls in three crates for a feature that is likely not used very often. So to turn your suggestion into a rule would be the following if I understand correctly:
|
I am torn. On the one hand, also after reading through tokio-rs/tokio#1811, I like the idea of an empty On the other hand there are special features, like Do you know of more crates that follow the empty In the end, I think I am fine with either way, as long as:
Thanks for all the input! |
I firmly believe that requirements like this have to come with a test, preferably e2e. At that point, we don't have a compile error yes, but we will fail in the next bigger feedback loop: testing.
That is exciting! @dvc94ch Unless you are happy to do it, I am fine with taking on these tasks given that I brought up this idea. Let me know your preference! |
Sorry I haven't gotten around to it yet. But if you I'm happy to take you up on your offer. I'll see if I can add tls to libp2p-quic this weekend. |
any features required to make a network behaviour work will be specified manually. for testing it is common to just add libp2p to the dev-dependencies to get a development-transport. This PR disables all the features that aren't required for building a development transport.