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

nightly no-std dharitri-sc-codec

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

16 unstable releases (3 breaking)

0.5.1 Feb 26, 2024
0.5.0 Feb 26, 2024
0.4.9 Feb 23, 2024
0.2.0 Jan 17, 2024
0.0.2 Oct 30, 2023

#2250 in Magic Beans

Download history 40/week @ 2024-01-07 62/week @ 2024-01-14 4/week @ 2024-01-21 281/week @ 2024-02-11 961/week @ 2024-02-18 472/week @ 2024-02-25 34/week @ 2024-03-03 22/week @ 2024-03-10 26/week @ 2024-03-17 93/week @ 2024-03-31 4/week @ 2024-04-07 3/week @ 2024-04-14 8/week @ 2024-04-21

108 downloads per month
Used in 8 crates (via dharitri-sc)

GPL-3.0-only

120KB
3K 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

~61–375KB