#contract #klever #blockchain

no-std klever-sc-codec

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

2 releases

new 0.18.2 Apr 10, 2025
0.18.1 Mar 29, 2024

#216 in Magic Beans

Download history 3/week @ 2025-02-01 9/week @ 2025-02-08 10/week @ 2025-02-15 2/week @ 2025-03-08 12/week @ 2025-03-15 3/week @ 2025-03-22 114/week @ 2025-04-05

129 downloads per month
Used in 5 crates (via klever-sc)

GPL-3.0-only

130KB
3.5K SLoC

Smart contract standard codec

crates.io

Lightweight binary serializer/deserializer, written especially for Klever 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 Klever 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–270KB