esp-rs / esp-wifi-sys

Wi-Fi and BT drivers packaged for integration into bare-metal esp-wifi.
Apache License 2.0
401 stars 94 forks source link

How to depend on esp-wifi in an external example #427

Closed makepaddev closed 9 months ago

makepaddev commented 10 months ago

Hi!,

After getting the esp-wifi examples to work, i'm wondering how i should depend on esp-wifi for an external project. There are so many features flags / configs going on in the examples i have no idea how to extract it. Ideally it uses the same 'alias' system to switch chips, but i'm also fine hardcoding it somehow. I keep getting compiler errors because im probably missing some feature flag somewhere. Is there an example of an external project depending on esp-wifi? Also does esp-wifi 'forward' things like the hal and its other dependencies? Having to manually manage the versions of these in the end crate is also a headache.

Thanks

makepaddev commented 10 months ago

Say i want to put the DHCP example in an external project, how would that work?

bjoernQ commented 10 months ago

We have the features documented here: https://github.com/esp-rs/esp-wifi/blob/main/esp-wifi/README.md#features (plus the feature for the chip you are targeting)

You could look at repositories using esp-wifi: https://github.com/esp-rs/esp-wifi/network/dependents - but probably not all of them are updated recently

We don't re-export esp-hal or any other of our dependencies

MabezDev commented 9 months ago

@makepaddev esp-template supports some level of code generation for esp-wifi, you can then cross reference the example features to build up to the DHCP example.