#version #different #serialization #migrating #data #hifumi

macro hifumi-macros

A serialization library for migrating data between different versions

2 releases

0.1.1 Dec 8, 2024
0.1.0 Dec 8, 2024

#711 in Procedural macros

Download history 111/week @ 2024-12-02 142/week @ 2024-12-09

253 downloads per month
Used in hifumi

Apache-2.0

36KB
881 lines

hifumi

Crates.io License Crates.io Version GitHub Actions Workflow Status

Introduction

A serialization library for migrating data between different versions.

The name hifumi comes from the character Hifumi in the game Blue Archive.

Still in development, the API may change in the future.

Quick Start

use hifumi::version;

#[version("0.2")]
#[derive(Debug, Clone, PartialEq)]
#[migration("0.1" => "0.2" {
    + (c: i32, d: i32) => e: String { (c + d).to_string() },
    - f: f32,
})]
struct Test {
    a: i32,
    b: i32,
    c: i32,
    d: i32,
    e: String,
}

Dependencies

~1.4–2.3MB
~48K SLoC