34 releases (12 breaking)

1.0.0 May 22, 2023
0.19.0 May 11, 2023
0.18.1 Mar 27, 2023
0.8.3 Oct 27, 2022

#5 in #coap-message

Download history 9/week @ 2024-06-29 105/week @ 2024-07-06 305/week @ 2024-07-27 1/week @ 2024-08-03 11/week @ 2024-09-21 148/week @ 2024-09-28

159 downloads per month
Used in 2 crates

MIT/Apache

175KB
3K SLoC

crates.io docs.rs Maintenance

toad-msg

Low-level representation of CoAP messages.

The most notable item in toad_msg is Message; a CoAP message very close to the actual byte layout.

Allocation

CoAP messages are growable and dynamically sized:

  • The message payload (http equiv: the request/response body)
  • the number of options (http equiv: headers)
  • the value of an option (http equiv: header value)

Performance

This crate uses criterion to measure performance of the heaped & heapless implementations in this crate as well as coap_lite::Packet.

In general, toad_msg::VecMessage performs identically to coap_lite (+/- 5%), and both are much faster than toad_msg::ArrayVecMessage.

Benchmarks:

Serializing to bytes

Click to expand chart

chart

Deserializing from bytes

Click to expand chart

chart

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~4–5.5MB
~109K SLoC