postcard
capnproto-rust
postcard | capnproto-rust | |
---|---|---|
7 | 6 | |
708 | 1,952 | |
- | 1.3% | |
5.9 | 9.1 | |
12 days ago | about 1 month ago | |
Rust | Rust | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
postcard
-
Best format for high-performance Serde?
I've been enjoying postcard as a lightweight efficient binary serialization.
-
Ractor: not just another actor framework
That said, postcard is not a self describing format (so everyone needs the same schema, no changes allowed), but I do have a tracking issue open for ways to handle this in the future.
-
Are there any serialization crates that do Varint encoding without Zigzag encoding?
For example, look at the Postcard serializer for inspiration.
-
Hey Rustaceans! Got a question? Ask here! (51/2022)!
Serde should be no_std, I have used it embedded with crates such as postcard. You can see how postcard disables default features of serde here : https://github.com/jamesmunns/postcard/blob/main/Cargo.toml
-
jemi: a compact JSON serializer for embedded systems
Another option that may work for some is SerDe on rust. You just write a struct with the fields you want #[derive(Serialize, Deserialize)] above it, and if codegens the functions to deserialize that struct from JSON and serialize it back. Example looks like this https://docs.rs/serde_json/latest/serde_json/#creating-json-by-serializing-data-structures (but you have to use serde-json-core if you don’t have an allocator). Can also easily reserialize to something small like postcard that’s meant for embedded storage.
-
Karmem: A fast binary serialization format faster than Google Flatbuffers
https://github.com/jamesmunns/postcard
postcard seems like it would be particularly strong for the wasm use case as it produces small messages that are light in memory.
capnproto-rust
- Best format for high-performance Serde?
-
Cap'n Proto - RPC at the speed of Rust - Part 1
The only hurdle I have is that while the documentation is extensive it is a little confusing in places and mainly focuses on C++ and the C++ RPC system which is a little different to the Rust code. There are Rust examples in the official repo which I will try and leverage here.
-
Hey Rustaceans! Got an easy question? Ask here (9/2022)!
capnproto-rust is the official Rust implementation.
- Any suggestion to build a long-lived connection with dual-rpc capability
-
Pijul 1.0 Beta
Hi, you seem to know a bit about Sanakirja!
It stores 4kb blobs, right? Does Pijul first parses the data (copying it to other allocations), or uses the data as is? I mean, there are some libraries like cap'n'proto[0] and rkyv[1] that can directly use the file contents as an in-memory data structure, I was wondering if Pijul did anything like that.
I mean, is this btree page [2] stored exactly like this on disk, and does Pijul exploits that to avoid further copying data?
(I guess there's a trouble with compression there: to decompress you really need to write in another buffer)
Also, is the I/O done with something that prevent userspace copies like mmap or io_uring, or does it eventually calls read() to copy the data to its own buffer?
I want to build something like Sanakirja, but with those features, so I'm wondering if there's any overlap.
[0] https://github.com/capnproto/capnproto-rust
[1] https://github.com/rkyv/rkyv
[2] https://docs.rs/sanakirja-core/latest/sanakirja_core/btree/p...
- Is there a library like Serde but which makes it easy to mutate serialized data stored in a [u8] or Vec<u8>?
What are some alternatives?
tinycbor - Concise Binary Object Representation (CBOR) Library
tarpc - An RPC framework for Rust with a focus on ease of use.
karmem - Karmem is a fast binary serialization format, faster than Google Flatbuffers and optimized for TinyGo and WASM.
UnrealEngine
ractor - Rust actor framework
rkyv - Zero-copy deserialization framework for Rust
json-maker - C library used to code JSON objects in null-terminated strings
bincode - A binary encoder / decoder implementation in Rust.
speedy - A fast binary serialization framework
x25519-dalek - X25519 elliptic curve Diffie-Hellman key exchange in pure-Rust, using curve25519-dalek.
tiny-json - The tiny-json is a versatile and easy to use json parser in C suitable for embedded systems. It is fast, robust and portable.
Rocket - A web framework for Rust.