quic-rpc
quic-rpc copied to clipboard
Switch to postcard encoding
We use postcard a lot at n0. I like it because it is a very simple format. I think it will still be fast enough despite all the varints.
This is not so easy since tokio_serde does not have postcard as an encoding. https://docs.rs/tokio-serde/latest/tokio_serde/
Not that hard either, but it is not as simple as just changing a dependency...
https://crates.io/crates/tokio-serde-postcard works well enough
https://crates.io/crates/tokio-serde-postcard works well enough
Yeah, that is what I am using now. However, I have second thoughts about the whole tokio_serde crate. It is allocating for every single entry that is being serialized.
Both crates are small enough to consider a more hand tailored code if needed though