Skip to content

udp_async: Implement async traits of upcoming async-embedded-nal > 0.3

The async UDP traits we experimentally added in 0.1.3 got the boot in async-embedded-nal, with new ones returned in https://github.com/rust-embedded-community/embedded-nal/pull/73.

This MR implements the new ones. While it's functional, I'm putting it on hold as WIP because I think it makes sense to do two more things simultaneously with adding them:

  • Move them to a std-async-embedded-nal. This follows the structure of the embedded-nal traits, and moves us out of the semver danger zone of having a feature versioned differently.
  • Retcon the "std" in the name. For the sync traits, it means "implemented using std". With the previous version that could still be justified because things were backed by async-std. But now we need PKTINFO (the async traits discussion has ample justification of why local information should be here; if extra illustration is needed: QUIC implementations just have an unsolved ToDo for platforms that can't do it). We're still targeting "platforms that support std", but we now have to do busy work per platform. Conveniently, everything that has a regular POSIX libc with recvmsg is one platform for this purpose -- but Windows support would need an enthusiastic Windows developer to somehow wedge Windows' way of doing it in.

Merge request reports

Loading