4 releases

0.1.0 Feb 4, 2022
0.1.0-dev.2 Dec 31, 2021
0.1.0-dev.1 Dec 29, 2021
0.0.0-reserve.0 Dec 24, 2021

#1506 in Encoding

Download history 203/week @ 2024-03-13 156/week @ 2024-03-20 268/week @ 2024-03-27 157/week @ 2024-04-03 182/week @ 2024-04-10 157/week @ 2024-04-17 173/week @ 2024-04-24 132/week @ 2024-05-01 103/week @ 2024-05-08 141/week @ 2024-05-15 130/week @ 2024-05-22 139/week @ 2024-05-29 92/week @ 2024-06-05 121/week @ 2024-06-12 105/week @ 2024-06-19 83/week @ 2024-06-26

413 downloads per month
Used in 17 crates (7 directly)

MIT/Apache

6KB
99 lines

Transmog

Universal data serialization utilities for Rust.

Transmog forbids unsafe code crate version Live Build Status HTML Coverage Report for main branch Documentation for main branch

Rust has a vibrant ecosystem chock full of serialization crates. Many crates implement a common set of traits via Serde, but other crates can not or chose not to support Serde.

At the end of the day, however, most serialization formats can be interacted with in a generic fashion. The Format trait aims to be the universal serialization trait for any crate that can serialize from a std::io::Read and deserialize from a std::io::Write.

Status of this project

We are currently at the experimentation phase of creating this ecosystem. All constructive criticism, format requests, and questions are welcome on Github Issues. We are looking to use this crate as a strategy of offering versioned data support in BonsaiDb as well as customizable serialization support for Fabruic.

Serialization format support

We accept pull requests for any moderately stable serialization API.

Utilities for migrating data structures

Sometimes a breaking change is unavoidable. Perhaps, you've decided a different format is better for your situation. Or, you refactored your structure so much that serde's built-in attributes aren't enough to help. transmog-versions to the rescue!

The transmog-versions crate provides APIs that allow you to treat your currently stored data as "version 0" and provide the logic for handling loading each version of data.

Plans to add a derive macro to remove even more boilerplate code is planned.

Serializing/Deserializing from a futures::Stream

The transmog-async crate is a fork of async-bincode, altered to support the Format trait.

Open-source Licenses

This project, like all projects from Khonsu Labs, are open-source. This repository is available under the MIT License or the Apache License 2.0.

To learn more about contributing, please see CONTRIBUTING.md.

No runtime deps

Features