Müsli - An experimental binary serialization framework with more choice

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • musli

    Müsli is a flexible and generic binary serialization framework

  • A note on performance and size: Some benchmarks and statistics are included in the README. But only because people will be curious. I've based my methodology on rust_serialization_benchmark, but decided to not extend it (for now) since it seems to exclude any Rust types which are not widely supported by all formats being tested (like HashMap's and 128-bit numbers). The test suite is already quite nice if you want to take it for a spin.

  • rust_serialization_benchmark

    Benchmarks for rust serialization frameworks

  • A note on performance and size: Some benchmarks and statistics are included in the README. But only because people will be curious. I've based my methodology on rust_serialization_benchmark, but decided to not extend it (for now) since it seems to exclude any Rust types which are not widely supported by all formats being tested (like HashMap's and 128-bit numbers). The test suite is already quite nice if you want to take it for a spin.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • rkyv

    Zero-copy deserialization framework for Rust

  • And before you ask: This only provides partial zero-copy support in strings and byte arrays like serde. But it's not like rkyv which constructs validated references into the data.

  • borrowme

    The missing compound borrowing for Rust.

  • "Borrow heuristics" saves a lot of configuration. It's basically just the macro analyzing the type signature of fields for references and with that it can do the right thing 95% of the time. If those lifetimes weren't there I suspect it would mean having to use a helluvalot of attributes to make up for the lack of markup doing it the other way around (think of cases where there's multiple lifetimes). Unclear how it should work for nested types too, like how you'd want Vec> to be a Vec>. Some strange attribute would be needed I think.

  • json

    Strongly typed JSON library for Rust (by serde-rs)

  • Number parsing uses a fairly naive but uses a lossless algorithm in musli-json. In serde_json they use a fork of lexical I haven't wrapped my head around. I wanted something simple to start with.

  • algebra

    Libraries for finite field, elliptic curve, and polynomial arithmetic

  • Love seeing the work on modes! There's definitely a use for this in cryptography, where you might want to serialize things containing elliptic curve points, which can be serialized in both "compressed" form and "uncompressed" form. We make extensive use of this in our serialization framework in arkworks: https://github.com/arkworks-rs/algebra/tree/master/serialize

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts