Skip to content

Commit

Permalink
Add changes from jamesmunns/postcard#127
Browse files Browse the repository at this point in the history
Add a FixedSizeByteArray type that can be used to serialize fixed-size
byte arrays faster than all other available methods. This type only
works with postcard. A more general solution would need to be
implemented in serde itself.

This works around serde-rs/serde#2680.
  • Loading branch information
hrxi committed Feb 23, 2024
1 parent 40f26cf commit 920fc0e
Show file tree
Hide file tree
Showing 7 changed files with 670 additions and 8 deletions.
189 changes: 188 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions postcard/Cargo.toml
Expand Up @@ -67,3 +67,19 @@ heapless-cas = ["heapless", "heapless/cas"]
alloc = ["serde/alloc", "embedded-io/alloc"]
use-defmt = ["defmt"]
use-crc = ["crc", "paste"]

[dev-dependencies.criterion]
version = "0.5"

[dev-dependencies.serde-big-array]
version = "0.5.1"

[dev-dependencies.serde_bytes]
version = "0.11.12"

[dev-dependencies.serde-byte-array]
version = "0.1.2"

[[bench]]
name = "byte_array"
harness = false

0 comments on commit 920fc0e

Please sign in to comment.