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

Download history 458/week @ 2024-08-23 466/week @ 2024-08-30 499/week @ 2024-09-06 467/week @ 2024-09-13 433/week @ 2024-09-20 271/week @ 2024-09-27 286/week @ 2024-10-04 279/week @ 2024-10-11 449/week @ 2024-10-18 398/week @ 2024-10-25 197/week @ 2024-11-01 112/week @ 2024-11-08 115/week @ 2024-11-15 470/week @ 2024-11-22 319/week @ 2024-11-29 376/week @ 2024-12-06

1,294 downloads per month
Used in 20 crates (14 directly)

Custom license

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