1 release (0 unstable)

1.2.0-dev Mar 20, 2024

#1067 in Encoding

Download history 127/week @ 2024-03-16 22/week @ 2024-03-23 50/week @ 2024-03-30 82/week @ 2024-04-06 157/week @ 2024-04-13

320 downloads per month
Used in 17 crates (14 directly)

Custom license

500KB
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
~63K SLoC