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

no-std dharitri-sc-codec

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

2 stable releases

1.0.1 Jan 19, 2025
0.5.1 Feb 26, 2024
0.4.9 Feb 23, 2024
0.2.0 Jan 17, 2024
0.0.2 Oct 30, 2023

#7 in #dharitri

Download history 2/week @ 2024-11-13 10/week @ 2024-11-20 7/week @ 2024-11-27 17/week @ 2024-12-04 12/week @ 2024-12-11 246/week @ 2025-01-15 13/week @ 2025-01-22 18/week @ 2025-01-29 30/week @ 2025-02-05 28/week @ 2025-02-12 29/week @ 2025-02-19 13/week @ 2025-02-26

105 downloads per month
Used in 16 crates (2 directly)

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

~69–475KB
~11K SLoC