Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

NoProto

> 数据库
Open source

Flexible, Fast & Compact Serialization with RPC

383 stars0 likes1 views
WebsiteGitHub

About

Flexible, Fast & Compact Serialization with RPC

NoProto: Flexible, Fast & Compact Serialization with RPC

Github | Crates.io | Documentation

Monorepo Status

The stable Rust implementation is pinned to no_proto 0.9.60. The experimental 0.10.0 refactor has been abandoned so future work can focus on a language-neutral NoProto specification and compatible implementations.

Repository layout:

  • no_proto_rs/ - stable Rust crate and current reference implementation.
  • no_proto_js/ - existing Rust/WASM JavaScript package.
  • packages/ - home for native language implementations such as JavaScript, PHP, and Go.
  • spec/ - shared NoProto format and schema specification.
  • conformance/ - cross-language compatibility test plan and fixtures.
  • bench/ - Rust benchmark suite.

Features

Lightweight

  • Zero dependencies
  • no_std support, WASM ready
  • Most compact non compiling storage format

Stable

  • Safely accept untrusted buffers
  • Passes Miri compiler safety checks
  • Panic and unwrap free

Easy

  • Extensive Documentation & Testing
  • Full interop with JSON, Import and Export JSON values
  • Thoroughly documented & simple data storage format

Fast

  • Zero copy deserialization
  • Most updates are append only
  • Deserialization is incrimental

Powerful

  • Native byte-wise sorting
  • Supports recursive data types
  • Supports most common native data types
  • Supports collections (list, map, struct & tuple)
  • Supports arbitrary nesting of collection types
  • Schemas support default values and non destructive updates
  • Transport agnostic RPC Framework.

Why ANOTHER Serialization Format?

  1. NoProto combines the performance of compiled formats with the flexibilty of dynamic formats:

Compiled formats like Flatbuffers, CapN Proto and bincode have amazing performance and extremely compact buffers, but you MUST compile the data types into your application. This means if the schema of the data changes the application must be recompiled to accomodate the new schema.

Dynamic formats like JSON, MessagePack and BSON give flexibilty to store any data with any schema at runtime but the buffers are fat and performance is somewhere between horrible and hopefully acceptable.

NoProto takes the performance advantages of compiled formats and implements them in a flexible format.

  1. NoProto is a key-value database focused format:

Byte Wise Sorting Ever try to store a signed integer as a sortable key in a database? NoProto can do that. Almost every data type is stored in the buffer as byte-wise sortable, meaning buffers can be compared at the byte level for sorting without deserializing.

Primary Key Management Compound sortable keys are extremely easy to generate, maintain and update with NoProto. You don't need a custom sort function in your key-value store, you just need this library.

UUID & ULID Support NoProto is one of the few formats that come with first class suport for these popular primary key data types. It can easily encode, decode and generate these data types.

Fastest Updates NoProto is the only format that supports all mutations without deserializng. It can do the common database read -> update -> write operation between 50x - 300x faster than other dynamic formats. Benchamrks

Comparison With Other Formats

Compared to Apache Avro

  • Far more space efficient

  • Significantly faster serialization & deserialization

  • All values are optional (no void or null type)

  • Supports more native types (like unsigned ints)

  • Updates without deserializng/serializing

  • Works with no_std.

  • Safely handle untrusted data.

Compared to Protocol Buffers

  • Comparable serialization & deserialization performance

  • Updating buffers is an order of magnitude faster

  • Schemas are dynamic at runtime, no compilation step

  • All values are optional

  • Supports more types and better nested type support

  • Byte-wise sorting is first class operation

  • Updates without deserializng/serializing

  • Safely handle untrusted data.

  • All values are optional and can be inserted in any order.

Compared to JSON / BSON

  • Far more space efficient

  • Significantly faster serialization & deserialization

  • Deserializtion is zero copy

  • Has schemas / type safe

  • Supports byte-wise sorting

  • Supports raw bytes & other native types

  • Updates without deserializng/serializing

  • Works with no_std.

  • Safely handle untrusted data.

Compared to Flatbuffers / Bincode

  • Data types can change or be created at runtime

  • Updating buffers is an order of magnitude faster

  • Supports byte-wise sorting

  • Updates without deserializng/serializing

  • Works with no_std.

  • Safely handle untrusted data.

  • All values are optional and can be inserted in any order.

Format Zero-Copy Size Limit Mutable Schemas Byte-wise Sorting
Runtime Libs
NoProto ✓ ~4GB ✓ ✓ ✓
Apache Avro ✗ 2^63 Bytes ✗ ✓ ✓
JSON ✗ Unlimited ✓ ✗ ✗
BSON ✗ ~16MB ✓ ✗ ✗
MessagePack ✗ Unlimited ✓ ✗ ✗
Compiled Libs
FlatBuffers ✓ ~2GB ✗ ✓ ✗
Bincode ✓ ? ✓ ✓ ✗
Protocol Buffers ✗ ~2GB ✗ ✓ ✗
Cap'N Proto ✓ 2^64 Bytes ✗ ✓ ✗
Veriform ✗ ? ✗ ✗ ✗

Quick Example

…

Guided Learning / Next Steps:

  1. Schemas - Learn how to build & work with schemas.
  2. Factories - Parsing schemas into something you can work with.
  3. Buffers - How to create, update & compact buffers/data.
  4. RPC Framework - How to use the RPC Framework APIs.
  5. Data & Schema Format - Learn how data is saved into the buffer and schemas.

Benchmarks

While it's difficult to properly benchmark libraries like these in a fair way, I've made an attempt in the graph below. These benchmarks are available in the bench folder and you can easily run them yourself with cargo run --release.

The format and data used in the benchmarks were taken from the flatbuffers benchmarks github repo. You should always benchmark/test your own use case for each library before making any choices on what to use.

Legend: Ops / Millisecond, higher is better

Format / Lib Encode Decode All Decode 1 Update 1 Size (bytes) Size (Zlib)
Runtime Libs
NoProto
no_proto 1393 1883 55556 9524 308 198
Apache Avro
avro-rs 156 57 56 40 702 337
FlexBuffers
flexbuffers 444 962 24390 294 490 309
JSON
json 609 481 607 439 439 184
serde_json 938 646 644 403 446 198
BSON
bson 129 116 123 90 414 216
rawbson 130 1117 17857 89 414 216
MessagePack
rmp 661 623 832 202 311 193
messagepack-rs 152 266 284 138 296 187
Compiled Libs
Flatbuffers
flatbuffers 3165 16393 250000 2532 264 181
Bincode
bincode 6757 9259 10000 4115 163 129
Postcard
postcard 3067 7519 7937 2469 128 119
Protocol Buffers
protobuf 953 1305 1312 529 154 141
prost 1464 2020 2232 1040 154 142
Abomonation
abomonation 2342 125000 500000 2183 261 160
Rkyv
rkyv 1605 37037 200000 1531 180 154
  • Encode: Transfer a collection of fields of test data into a serialized Vec.
  • Decode All: Deserialize the test object from the Vec into all fields.
  • Decode 1: Deserialize th

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustapache-avroavrobsondata-buffers

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库