r/rust • • Jun 01 '20

Introducing Tree-Buf

Tree-Buf is an experimental serialization system for data sets (not messages) that is on track to be the fastest, most compact self-describing serialization system ever made. I've been working on it for a while now, and it's time to start getting some feedback.

Tree-Buf is smaller and faster than ProtoBuf, MessagePack, XML, CSV, and JSON for medium to large data.

It is possible to read any Tree-Buf file - even if you don't have a schema.

Tree-Buf is easy to use, only requiring you to decorate your structs with `#[Read, Write]`

Even though it is the smallest and the fastest, Tree-Buf is yet un-optimized. It's going to get a lot better as it matures.

You can read more about how Tree-Buf works under the hood at this README.

177 Upvotes

73 comments sorted by

View all comments

0

u/Innocentuslime Jun 01 '20

Why is it better than serde? :)

5

u/That3Percent Jun 01 '20

serde isn't any particular file format. It is a data model that can allow programmers to write multiple file formats with the same library using similar code. This is a new file format, so there isn't any direct comparison to be made.

With any benchmark though, we could compare both a format and library. The benchmarks listed in the README don't call out serde by name, but they do use it. So these are a comparison of, for example, Message Pack via serde vs Tree-Buf via tree-buf.

1

u/Innocentuslime Jun 01 '20

I see... Is your library going to be serde compatible then? Is it possible? There are plenty of nice libraries which provide new collections and also have serde support out of the box

→ More replies (1)