3 releases
Uses new Rust 2024
| 0.0.3 | Jan 19, 2026 |
|---|---|
| 0.0.2 | Jan 19, 2026 |
| 0.0.1 | Jan 13, 2026 |
#121 in #library
22KB
493 lines
🦀 Rust based RPC library on UDP.
Development Status
This crate is under active development. The first stable version will be released as v0.1.0.
lib.rs:
🦀 Rust-based UDP RPC library
Introduction
This library provides an RPC framework that allows you to build applications without dealing with routing or low-level protocol implementation details.
The function signature itself acts as the RPC identifier, making it possible to determine which function should be invoked when an incoming call is received.
Internally, the framework uses UDP to prioritize low latency and high throughput. Because of this design choice, the library is especially suited for performance-critical systems where speed is more important than delivery guarantees.
⚠️ Important note
UDP does not guarantee packet delivery, ordering, or duplication. This library should therefore be used only in domains where occasional packet loss is acceptable, or where reliability is handled at a higher layer.
Typical use cases include low-latency systems, internal services, and performance-sensitive workloads.pub mod codec;
Example of usage
use corgi::{rpc_fn, Container};
#[rpc_fn]
async fn hello_world(name: String) -> String {
format!("Hello, {}!", name)
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let container = Container::default()
.register(&*__CORGI_RPC_hello_world);
// Start UDP listener / event loop here
Ok(())
}
Dependencies
~8–12MB
~125K SLoC