5 stable releases
Uses new Rust 2024
| 1.4.1 | Jan 10, 2026 |
|---|---|
| 1.3.2 | Dec 31, 2025 |
| 1.2.1 | Dec 30, 2025 |
| 1.1.1 | Dec 26, 2025 |
| 1.0.24 | Dec 17, 2025 |
#25 in #durable
Used in 4 crates
91KB
2K
SLoC
runtara-protocol
Wire protocol layer for the Runtara durable execution platform. Provides QUIC transport and Protobuf message definitions for communication between workflow instances and the execution engine.
Overview
This crate is the foundation layer used by all other Runtara crates. It provides:
- QUIC Transport: Fast, secure communication using the Quinn library
- Protobuf Messages: Type-safe message definitions generated by prost
- TLS Support: Built-in certificate generation and verification
- Connection Management: Client and server connection utilities
Installation
Add to your Cargo.toml:
[dependencies]
runtara-protocol = "1.0"
Usage
Creating a QUIC Client
use runtara_protocol::quic::{QuicClient, ClientConfig};
// Configure the client
let config = ClientConfig {
server_addr: "127.0.0.1:8001".parse()?,
server_name: "localhost".to_string(),
skip_cert_verification: false,
};
// Create and connect
let client = QuicClient::new(config)?;
let connection = client.connect().await?;
Sending Protocol Messages
use runtara_protocol::instance::{RegisterRequest, RegisterResponse};
use runtara_protocol::send_request;
// Create a register request
let request = RegisterRequest {
instance_id: "my-instance".to_string(),
tenant_id: "tenant-123".to_string(),
..Default::default()
};
// Send and receive response
let response: RegisterResponse = send_request(&connection, request).await?;
Creating a QUIC Server
use runtara_protocol::quic::{QuicServer, ServerConfig};
let config = ServerConfig {
bind_addr: "0.0.0.0:8001".parse()?,
..Default::default()
};
let server = QuicServer::new(config)?;
while let Some(connection) = server.accept().await {
tokio::spawn(async move {
// Handle connection
});
}
Protocol Definitions
The crate includes Protobuf definitions for:
- Instance Protocol (
instance.proto): Communication between workflow instances and runtara-core- Register, checkpoint, signal polling, completion
- Environment Protocol (
environment.proto): Management SDK to runtara-environment- Image registration, instance lifecycle, status queries
- Management Protocol (
management.proto): Internal communication between environment and core- Health, signals, instance status, checkpoint listing/fetch
- Instance lifecycle and image registration are not exposed here; they live in
environment.proto
Related Crates
runtara-sdk- High-level SDK built on this protocolruntara-management-sdk- Management client using this protocol
License
This project is licensed under AGPL-3.0-or-later.
Dependencies
~18–35MB
~484K SLoC