#messagepack #serialization

rmpv

Decoding/Encoding MessagePack values without schema

6 releases (stable)

Uses new Rust 2024

1.3.1 Dec 23, 2025
1.3.0 Apr 30, 2024
1.0.1 Jul 21, 2023
1.0.0 Aug 17, 2021
0.3.4 Mar 26, 2017

#151 in Encoding

Download history 285281/week @ 2025-10-22 308592/week @ 2025-10-29 314408/week @ 2025-11-05 376904/week @ 2025-11-12 290894/week @ 2025-11-19 165926/week @ 2025-11-26 298457/week @ 2025-12-03 382915/week @ 2025-12-10 310894/week @ 2025-12-17 94306/week @ 2025-12-24 193296/week @ 2025-12-31 439853/week @ 2026-01-07 451422/week @ 2026-01-14 569536/week @ 2026-01-21 490425/week @ 2026-01-28 398137/week @ 2026-02-04

2,029,115 downloads per month
Used in 363 crates (117 directly)

MIT license

240KB
5K SLoC

RMP - Rust MessagePack

RMP is a complete pure-Rust MessagePack implementation. MessagePack a compact self-describing binary serialization format.

This project consists of three crates:

Features

  • Convenient and powerful APIs

    RMP is designed to be lightweight and straightforward. There is a high-level API with support for Serde, which provides you convenient interface for encode/decode Rust's data structures using derive attribute. There are also low-level APIs, which give you full control over data encoding/decoding process, with no-std support and without heap allocations.

  • Zero-copy value decoding

    RMP allows to decode bytes from a buffer in a zero-copy manner. Parsing is implemented in safe Rust.

  • Robust, stable and tested

    This project is developed using TDD and CI, so any found bugs will be fixed without breaking existing functionality.

Why MessagePack?

It's smaller and much simpler to parse than JSON. The encoded data is self-describing and extensible, without using any schema definitions. It supports the same data types as JSON, plus binary data, non-string map keys, all float values, and 64-bit numbers. Msgpack values use <lenght><data> encoding, so they can be safely concatenated and read from a stream.

MessagePack is similar to CBOR, but has simpler data types (no bignums, decimal floats, dates, or indefinite-length sets, etc.)

Requirements

  • An up-to-date stable version of Rust, preferably from rustup.

Build Coverage Status

Dependencies

~79–300KB