toad-msg

Crates.iotoad-msg
lib.rstoad-msg
version1.0.0-beta.6
sourcesrc
created_at2022-10-08 17:40:08.381157
updated_at2023-07-21 04:17:34.478866
descriptionLow-level CoAP message parsing & serialization
homepagehttps://github.com/clov-coffee/toad/toad-msg
repositoryhttps://github.com/clov-coffee/toad/toad-msg
max_upload_size
id683668
size200,268
Orion Kindel (cakekindel)

documentation

README

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.

Commit count: 0

cargo fmt