Skip to content
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

Make features optional #161

Closed
nazar-pc opened this issue Jun 21, 2024 · 2 comments · Fixed by #192
Closed

Make features optional #161

nazar-pc opened this issue Jun 21, 2024 · 2 comments · Fixed by #192
Assignees
Labels
enhancement New feature or request

Comments

@nazar-pc
Copy link

Right now due to str0m litep2p pulls OpenSSL, which is very undesirable due to how annoying it is to deal with.

Please consider making a set of optional features that selectively enable certain protocols. For example I'd like to disable WebRTC protocol because it is not used in Substrate anyway and makes me deal with OpenSSL with literally no benefit whatsoever. And annoyingly litep2p is a mandatory dependency of Substrate now, so I can't get rid of it easily either.

Something like libp2p-core and stuff would be much preferred over this monolith, but at very least having features that can be disabled would be very much appreciated.

@dmitry-markin
Copy link
Collaborator

This can be done, of course. However, one thing to consider is that WebRTC is going to be enabled by default in substrate as soon as this transport is stable in litep2p, as this is a long awaited feature needed by https://github.com/smol-dot/smoldot.

@nazar-pc
Copy link
Author

RocksDB is also enabled by default, but it can be disabled by specifying default-features = false, so I hope the same could be done here as well. Most of Substrate seems to only need a few types, so support for specific transports can be made behind features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Blocked ⛔️
Development

Successfully merging a pull request may close this issue.

2 participants