2 releases (1 stable)

1.2.0 May 17, 2024
1.2.0-dev Mar 20, 2024

#1125 in Encoding

Download history 148/week @ 2024-03-20 19/week @ 2024-03-27 63/week @ 2024-04-03 109/week @ 2024-04-10 178/week @ 2024-04-17 142/week @ 2024-04-24 71/week @ 2024-05-01 215/week @ 2024-05-15 112/week @ 2024-05-22 149/week @ 2024-05-29 85/week @ 2024-06-05 96/week @ 2024-06-12 115/week @ 2024-06-19 101/week @ 2024-06-26

409 downloads per month
Used in 19 crates (14 directly)

Custom license

520KB
12K 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

~3MB
~64K SLoC