| Crates.io | rusteron-client |
| lib.rs | rusteron-client |
| version | 0.1.154 |
| created_at | 2024-10-26 11:10:12.087419+00 |
| updated_at | 2025-09-13 10:51:47.514105+00 |
| description | Provides core client functionalities for interacting with the Aeron protocol, such as establishing connections, subscribing, and publishing. It uses the Aeron C bindings from aeron-client module. |
| homepage | https://github.com/gsrxyz/rusteron |
| repository | https://github.com/gsrxyz/rusteron |
| max_upload_size | |
| id | 1423767 |
| size | 20,284,313 |
rusteron-client is a core component of the Rusteron project.
It provides a Rust wrapper around the Aeron C client API, enabling high-performance, low-latency communication in distributed systems built with Rust.
This crate supports publishing, subscribing, and managing Aeron resources, while exposing a flexible and idiomatic interface over unsafe C bindings.
Due to its reliance on raw FFI, developers must take care to manage resource lifetimes and concurrency correctly.
offer() or try_claim()..new() automatically call *_init and *_close, where supported.Result<T, AeronCError> for ergonomic error handling.&CStr, outputs return &str, giving developers precise allocation control.new() Initialization: Automatically calls the corresponding *_init method.Drop will invoke the appropriate *_close or *_destroy methods.set_aeron() or where lifetimes aren't managed internally, users are responsible for safety.Handlers::leak(...) and Handlers::release(...).Handlers allow users to customize responses to Aeron events (errors, image availability, etc). There are two ways to use them:
This is the most performant and idiomatic approach.
use rusteron_client::*;
pub struct MyErrorHandler;
impl AeronErrorHandlerCallback for MyErrorHandler {
fn handle_aeron_error_handler(&mut self, code: i32, msg: &str) {
eprintln!("Aeron error ({}): {}", code, msg);
}
}