#smart-contracts #dharitri #blockchain

no-std dharitri-sc-codec

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

31 stable releases

1.19.0 Jul 7, 2025
1.17.2 Jun 23, 2025
1.0.1 Jan 19, 2025
0.21.2 Jun 23, 2025
0.0.5 Nov 7, 2023

#7 in #dharitri

Download history 75/week @ 2025-10-16 69/week @ 2025-10-23 34/week @ 2025-10-30 32/week @ 2025-11-06 28/week @ 2025-11-13 27/week @ 2025-11-20 33/week @ 2025-11-27 28/week @ 2025-12-04 24/week @ 2025-12-11 23/week @ 2025-12-18 29/week @ 2025-12-25 41/week @ 2026-01-01 10/week @ 2026-01-08 21/week @ 2026-01-15 35/week @ 2026-01-22 25/week @ 2026-01-29

99 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

~125–345KB