Lightning fast serialization and deserialization for the Rion Data format
Ferion is a high-performance Rust library for working with RION (Raw Internet Object Notation), a compact and efficient binary serialization format. RION combines the flexibility of JSON with the compactness of binary formats, making it ideal for high-throughput data processing and storage applications.
- Memory Efficient: RION's compact binary format significantly reduces memory usage compared to text-based formats.
- Seamless Integration: Works smoothly with Serde, allowing easy serialization of Rust structs and enums.
- Type Safety: Leverages Rust's type system to ensure correctness at compile-time.
- Zero-Copy Deserialization: Supports borrowing data directly from the input buffer for maximum efficiency.
Add Ferion to your Cargo.toml
:
[dependencies]
ferion = { git = "https://github.com/Exotik850/ferion.git" }
use ferion::{to_bytes, from_bytes};
use serde::{Serialize, Deserialize};
#[derive(Serialize, Deserialize, Debug, PartialEq)]
struct Person {
name: String,
age: u32,
}
fn main() {
let person = Person {
name: "Alice".to_string(),
age: 30,
};
// Serialize to RION
let encoded: Vec<u8> = to_bytes(&person).unwrap();
// Deserialize from RION
let decoded: Person = from_bytes(&encoded).unwrap();
assert_eq!(person, decoded);
println!("Serialization and deserialization successful!");
}
We welcome contributions to Ferion! Here's how you can help:
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature
) - Make your changes and commit (
git commit -am 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Ferion is licensed under the MIT License, see License for details