6 releases (2 stable)
1.3.0 | Nov 26, 2024 |
---|---|
1.2.0 | May 17, 2024 |
1.2.0-dev | Mar 20, 2024 |
#1130 in Encoding
1,294 downloads per month
Used in 20 crates
(14 directly)
695KB
16K
SLoC
Scrypto Binary Object Representation
Scrypto Binary Object Representation (SBOR) is an open, efficient and Rust-native data format used by Scrypto and Radix Engine V2.
Why Another Data Format?
Data serialization and deserialization are required for Scrypto in many places, e.g. system function calls and component interactions. We need a framework that supports efficient data encoding, decoding and describing.
Serde and its supported data formats have been a good start, but didn't meet all our requirements.
- Bincode is performant but require data schema for decoding;
- JSON is self-descriptive but is slow because of its text-based representation;
- Neither supports schema generation.
Design Objectives
- Rust Native: It should support most, if not all, Rust types.
- Schemaless: It should support schemaless data encoding and encoding.
- Fully Specified: It should come with full specification.
- Fast: It should be fast.
Dependencies
~3.5MB
~68K SLoC