Avro serialization and schema derivation from Rust types
Find a file
2025-12-08 13:22:32 -05:00
benches simd string deserialization 2025-12-08 11:47:13 -05:00
evola-derive generics support 2025-12-08 13:22:32 -05:00
examples support field renaming 2025-12-07 11:18:26 -05:00
src fx names 2025-12-08 12:57:06 -05:00
tests generics support 2025-12-08 13:22:32 -05:00
.gitignore basic implementation 2025-12-05 19:31:58 -05:00
Cargo.lock simd string deserialization 2025-12-08 11:47:13 -05:00
Cargo.toml simd string deserialization 2025-12-08 11:47:13 -05:00
README.md rename to evola 2025-12-06 09:01:37 -05:00

Evola

A high-performance, minimal Avro binary codec implementation in Rust with built-in schema evolution support.

Features

  • Fast binary encoding/decoding - Optimized for speed with zero-copy deserialization
  • Schema evolution - Built-in support for schema migration with defaults, aliases, and optional fields
  • Derive macros - Automatic schema generation and serialization from Rust types
  • Minimal dependencies - Lightweight and focused on performance

Quick Start

use evola::{AvroSchema, AvroSerialize, AvroDeserialize};

#[derive(AvroSchema, AvroSerialize, AvroDeserialize)]
struct User {
    #[avro(0)]
    id: i64,
    #[avro(1)]
    name: String,
    #[avro(2, default = "unknown@example.com")]
    email: String,
}

// Serialize
let user = User { 
    id: 1, 
    name: "Alice".to_string(),
    email: "alice@example.com".to_string(),
};
let bytes = user.serialize_to_vec().unwrap();

// Deserialize
let decoded = User::deserialize_from_slice(&bytes).unwrap();

Schema Evolution

Evola supports seamless schema evolution with:

  • Default values - Fields can have default values for backward compatibility
  • Optional fields - Option fields automatically default to None
  • Field aliases - Rename fields while maintaining compatibility
  • Zero-copy strings - Borrow strings directly from the input buffer

Performance

Benchmarks show Evola is significantly faster than other Rust serialization libraries:

  • ~35% faster deserialization with zero-copy strings
  • Optimized varint encoding
  • Minimal allocations

License

MIT or Apache 2.0