#media-driver #aeron #aeron-c-bindings #networking #low-latency

bin+lib rusteron-media-driver

Implements the Aeron Media Driver, a core component for managing messaging between producers and consumers. It uses the Aeron C bindings from aeron-driver module.

128 releases

0.1.160 Dec 5, 2025
0.1.159 Nov 23, 2025
0.1.157 Oct 29, 2025
0.1.150 Jul 27, 2025
0.1.36 Nov 12, 2024

#1230 in Network programming

Download history 572/week @ 2025-10-15 1139/week @ 2025-10-22 1233/week @ 2025-10-29 832/week @ 2025-11-05 813/week @ 2025-11-12 1792/week @ 2025-11-19 3859/week @ 2025-11-26 3110/week @ 2025-12-03 2211/week @ 2025-12-10 1535/week @ 2025-12-17 376/week @ 2025-12-24 786/week @ 2025-12-31 1680/week @ 2026-01-07 3193/week @ 2026-01-14 3664/week @ 2026-01-21 3754/week @ 2026-01-28

12,588 downloads per month

MIT/Apache

19MB
374K SLoC

Java 177K SLoC // 0.2% comments Rust 97K SLoC // 0.0% comments C 52K SLoC // 0.0% comments C++ 47K SLoC // 0.1% comments AsciiDoc 638 SLoC // 0.1% comments Batch 423 SLoC // 0.6% comments PowerShell 178 SLoC // 0.1% comments Python 72 SLoC Shell 33 SLoC // 0.1% comments

Contains (JAR file, 44KB) aeron/gradle/wrapper/gradle-wrapper.jar

rusteron-media-driver

rusteron-media-driver is a Rust interface to the Aeron Media Driver, responsible for managing low-latency messaging infrastructure between producers and consumers. It's part of the Rusteron project and provides both standalone and embedded driver support.

For production deployments, we recommend using the Aeron Java or C media driver.
The embedded version provided here is best suited for integration tests or lightweight environments.


Installation

To use rusteron-media-driver, add the appropriate dependency to your Cargo.toml:

Dynamic
[dependencies]
rusteron-media-driver = "0.1"
Static
[dependencies]
rusteron-media-driver = { version = "0.1", features = ["static"] }
Static with precompiled C libs (macOS only)
[dependencies]
rusteron-media-driver = { version = "0.1", features = ["static", "precompile"] }

Ensure the Aeron C libraries are properly installed and available on your system.


Usage Examples

Standard Media Driver
// Launches a standalone Aeron Media Driver
use rusteron_media_driver::*;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let aeron_context = AeronDriverContext::new()?;
    aeron_context.set_dir(&"target/test".into_c_string())?;

    let aeron_driver = AeronDriver::new(&aeron_context)?;
    aeron_driver.start(false)?;
    println!("Aeron Media Driver started");

    Ok(())
}
Embedded Media Driver
// Embeds the media driver directly into the current process
use rusteron_media_driver::*;
use std::sync::{Arc, atomic::{AtomicBool, Ordering}};
use std::thread;
use std::time::Duration;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let media_driver_ctx = AeronDriverContext::new()?;
    let (stop, driver_handle) = AeronDriver::launch_embedded(media_driver_ctx.clone(), false);

    let ctx = AeronContext::new()?;
    ctx.set_dir(&media_driver_ctx.get_dir().into_c_string())?;

    thread::sleep(Duration::from_secs(3)); // Simulated workload

    stop.store(true, Ordering::SeqCst);
    driver_handle.join().expect("Failed to join driver thread");
    println!("Embedded Aeron Media Driver stopped");

    Ok(())
}

Dependencies

~4–11MB
~186K SLoC