hexga_io

Crates.iohexga_io
lib.rshexga_io
version0.0.11-beta.47
created_at2025-04-20 00:05:25.263173+00
updated_at2026-01-09 20:50:46.062893+00
descriptionio file abstraction based on serde to allow loading/saving/converting bytes with a custom extension
homepagehttps://github.com/Thomas-Mewily/hexga
repositoryhttps://github.com/Thomas-Mewily/hexga
max_upload_size
id1641243
size49,483
Mewily (Thomas-Mewily)

documentation

README

🚧 Warning: Experimental Crate! 🚧

This crate is currently in beta and experimental. It is subject to breaking changes in future releases. Use it at your own risk, and keep in mind that the API may change in future versions.

HexGa Io

Io file abstraction based on Hexga Encoding Load and Save to allow loading/saving a value to a file.

It support custom user define extension and convertion, and it's also support common markup extension (json, ron, xml...).

Goal :

  • Simple to use

use hexga_io::prelude::*;

"Hello file !".save_to_disk("./myfile.txt").unwrap();

let read = String::load_from_disk("./myfile.txt").unwrap();
assert_eq!("Hello file !", read);
// #[io] derive (serde::Serialize, serde::Deserialize) and (hexga_encoding::Load, hexga_encoding::Save)
#[io]
#[derive(PartialEq, Debug)]
struct Person
{
    age : i32,
    name : String,
}


let person = Person { age: 42, name: "Foo".to_owned() };
person.save_to_disk("./person.json").unwrap();
person.save_to_disk("./person.ron" ).unwrap();

assert_eq!(Person::load_from_disk("./person.ron"), Ok(person));

Main Hexga crate

Check hexga : https://crates.io/crates/hexga if you are interested in a quick start, it regroup multiple hexga crates.

Commit count: 710

cargo fmt