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

Add features to disable various network protocols #340

Merged
merged 3 commits into from
Nov 13, 2023
Merged

Add features to disable various network protocols #340

merged 3 commits into from
Nov 13, 2023

Conversation

BryanKadzban
Copy link
Contributor

smoltcp has feature flags to allow enabling and disabling several protocols. Expose those feature flags to users of esp-wifi as well, to let them trim down both esp-wifi and smoltcp.

Also added a loop to the CI config to build with all combinations of all these new feature flags, to ensure all the possible combinations continue to work.

Fixes #290

@bjoernQ
Copy link
Contributor

bjoernQ commented Nov 10, 2023

Looks good to me but we should also list the features in https://github.com/esp-rs/esp-wifi#features

Disable smoltcp if none of them is enabled, as well.  Restructure the
cargo features to make this possible: utils isn't needed unless one of
the protocols is on, but embedded-svc is needed even for sending and
receiving raw frames.

In order to do the latter, we also need a receive and transmit method on
the WifiDevice, rather than using the methods on the smoltcp Device impl
-- and we don't need to give them an Instant.  Copy the implementation.
Also fix up a couple references in old ones.
@BryanKadzban BryanKadzban reopened this Nov 11, 2023
@BryanKadzban
Copy link
Contributor Author

Good point; done.

Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for your contribution

@bjoernQ bjoernQ merged commit 3b3fa07 into esp-rs:main Nov 13, 2023
7 checks passed
@bugadani bugadani mentioned this pull request Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to disable unneeded socket types/protocols
2 participants