#framework #service-request #send #no-std

nightly no-std wasefire-protocol

Wasefire protocol between platform and host

2 unstable releases

0.2.0 Nov 12, 2024
0.1.0 Jul 23, 2024

#1917 in Embedded development

Download history 9/week @ 2024-08-26 20/week @ 2024-09-16 23/week @ 2024-09-23 17/week @ 2024-09-30 126/week @ 2024-11-11 28/week @ 2024-11-18 9/week @ 2024-11-25 39/week @ 2024-12-02 27/week @ 2024-12-09

108 downloads per month
Used in 6 crates (5 directly)

Apache-2.0

75KB
1.5K SLoC

Wasefire platform protocol.

This crate defines a high-level protocol between a host and a device. The host initiates requests and the device responds. Requests and responses use the same [Api] but with a different type parameter: Api<Request> and Api<Response> respectively. However, while the host sends an Api<Request>, the device responds with an ApiResult<T> where T is the service of the request.

This high-level protocol is eventually wrapped in a lower-level protocol for a given transport, for example USB. The host should provide enough time for the device to respond, but should eventually move on in case no response will ever come, for example when the device is reset before sending the response. Reciprocally, the device should accept a new request from the host and cancel the request it was processing if any. Protocol API parametric over the message direction.

Deprecated variants are only available to the host (to support older devices).

Dependencies

~0.3–0.8MB
~18K SLoC