#dharitri #blockchain #smart-contracts #wasm #contract #test-framework

no-std drt-sc-codec

Lightweight binary serializer/deserializer, written especially for Dharitri smart contracts

2 releases

0.20.1 Sep 2, 2024
0.0.3 Sep 2, 2024
0.0.1 Aug 27, 2024

#21 in #dharitri

Download history 112/week @ 2024-08-24 324/week @ 2024-08-31 41/week @ 2024-09-07 70/week @ 2024-09-14 51/week @ 2024-09-21 23/week @ 2024-09-28 8/week @ 2024-10-05 19/week @ 2024-10-12 11/week @ 2024-10-19 10/week @ 2024-10-26 29/week @ 2024-11-02 1/week @ 2024-11-09 12/week @ 2024-11-16 19/week @ 2024-11-23 22/week @ 2024-11-30 24/week @ 2024-12-07

77 downloads per month
Used in 9 crates (via drt-sc)

GPL-3.0-only

125KB
3.5K SLoC

Smart contract standard codec

crates.io

Lightweight binary serializer/deserializer, written especially for Dharitri smart contracts.

Designed to:

  • produce minimal WASM bytecode
  • be fast
  • avoid data copy as much as possible

Largely inspired by the Parity SCALE codec, but a completely different format and implementation.

For more info about the serialization format, see the developer reference.

no-std

Being designed for Dharitri smart contracts, it needs to be able to run in a no-std environment.

It is also safe to run in a regular std environment.

The types provided by default all work without an allocator. To use an allocator, pass feature flag "alloc".

Dependencies

~81–480KB
~11K SLoC