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

example/embassy_ble does not compile #436

Closed
alexkazik opened this issue Mar 6, 2024 · 2 comments
Closed

example/embassy_ble does not compile #436

alexkazik opened this issue Mar 6, 2024 · 2 comments

Comments

@alexkazik
Copy link

I've tried to compile (mainline Rust compiler) but it doesn't work, and I don't know how to fix it.
cargo +nightly esp32c3 --example embassy_ble --release --features "async,ble"

error: async closure does not implement `FnMut` because it captures state from its environment
   --> esp-wifi/examples/embassy_ble.rs:147:28
    |
147 |         let mut notifier = async || {
    |                            ^^^^^^^^
...
162 |         srv.run(&mut notifier).await.unwrap();
    |             --- required by a bound introduced by this call
    |

And other examples seem also not to work.

@bjoernQ
Copy link
Contributor

bjoernQ commented Mar 6, 2024

For recent compiler versions there is a small change needed. It's already prepared in a PR here: https://github.com/esp-rs/esp-wifi/pull/434/files#diff-4fa6b3b3d80c35ebc34a9b33a487051271cb99f4a03f46fcff852f553e764547 but that PR is waiting for the upcoming release of esp-hal (which will be soon)

With the changes in the PR it should work - let me know if it doesn't

@alexkazik
Copy link
Author

Yes, that does compile (though I currently can't test it on hardware).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants