| Crates.io | amaters-net |
| lib.rs | amaters-net |
| version | 0.1.0 |
| created_at | 2026-01-19 00:56:29.040885+00 |
| updated_at | 2026-01-19 00:56:29.040885+00 |
| description | Network layer for AmateRS (Musubi) |
| homepage | |
| repository | https://github.com/cool-japan/amaters |
| max_upload_size | |
| id | 2053406 |
| size | 307,985 |
Network layer for AmateRS (Musubi - The Knot)
amaters-net provides the networking infrastructure for AmateRS, implementing the Musubi component. It handles client-server communication using gRPC over QUIC with mutual TLS (mTLS) for secure, high-performance data exchange.
Client ←→ [Musubi] ←→ Server
├── gRPC
├── QUIC (HTTP/3)
├── mTLS
└── Connection Pool
service AmateRS {
rpc Execute(QueryRequest) returns (QueryResponse);
rpc ExecuteStream(stream QueryRequest) returns (stream QueryResponse);
}
message QueryRequest {
bytes query_bytes = 1; // Serialized AQL
bytes client_signature = 2;
}
message QueryResponse {
bytes result_bytes = 1;
bytes server_proof = 2; // Future: ZKP
}
use amaters_net::{Client, Server};
// Client
let client = Client::connect("https://localhost:7878")
.with_tls(cert_path, key_path)
.await?;
let query = QueryRequest { /* ... */ };
let response = client.execute(query).await?;
// Server
let server = Server::bind("0.0.0.0:7878")
.with_tls(cert_path, key_path)
.serve(handler)
.await?;
[network]
bind_address = "0.0.0.0:7878"
max_connections = 1000
idle_timeout_ms = 60000
keep_alive_interval_ms = 10000
[tls]
cert_path = "/etc/amaters/server.crt"
key_path = "/etc/amaters/server.key"
ca_path = "/etc/amaters/ca.crt"
[quic]
max_concurrent_streams = 100
initial_window_size = 65536
# Run unit tests
cargo test
# Integration tests with mock server
cargo test --test integration
# Benchmarks
cargo bench
tonic - gRPC frameworkquinn - QUIC implementationrustls - TLS librarytokio - Async runtimeLicensed under MIT OR Apache-2.0
COOLJAPAN OU (Team KitaSan)