Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains a WIP support for embassy.
Currently, the implementation is working and I can run CoAP server on nRF52840 target, but it breaks tokio. Changes done:
rand::thread_rng()
embassy requires that all spawned futures must be 'static which caused major problemsEDIT: TaskPool used for spawning futures requires
self: &'static Self
, futures must be 'static, not&'static
. So taskpool would have to be declared as static and passed to CoAP server, to declare static variable we must known concrete type of the future to be spawned with TaskPool,static POOL: TaskPool<impl Future>
won't work. AFAIK it's not possible to useasync move {}
- futures need to be created by implementingFuture
trait.Closes #8 and #3