packr-abi 0.5.4

Graph-encoded ABI for Pack runtime - supports recursive types
Documentation

Graph-encoded ABI for Pack runtime

This crate provides encoding and decoding for recursive data types using a graph-based binary format. It's no_std compatible for use in WASM packages.

Derive Macros

Enable the derive feature to use #[derive(GraphValue)]:

use packr_abi::{GraphValue, Value};

#[derive(GraphValue)]
struct Point {
    x: i64,
    y: i64,
}

let point = Point { x: 10, y: 20 };
let value: Value = point.into();
let back: Point = value.try_into().unwrap();