jamesmunns / postcard-rpc

An RPC layer for postcard based protocols
Apache License 2.0
48 stars 11 forks source link

Rework HostClient Wire Traits #25

Closed jamesmunns closed 3 weeks ago

jamesmunns commented 3 weeks ago

CC @spookyvision

closes #4

jamesmunns commented 3 weeks ago

The biggest difference I made since #17 is to split the client trait into independent parts.

This is to allow send and recv parts to have independently owned items, otherwise we would need a mutex for NUSB and Serial, which I'm not certain would work, as we want to wait concurrently.

It might be possible to implement the webusb part more elegantly, let me know if you have thoughts on this.

I don't think this is a breaking change, if not, then I'll plan to release this as 0.5.1. I expect a breaking release somewhat soon, as I'll likely need a breaking change for the MCU-side server stuff to support COBS for that.

This has not yet been tested on hardware, but the postcard-rpc "loopback" test is passing.

jamesmunns commented 3 weeks ago

Going to go ahead and merge, @spookyvision let me know if you have any questions.