Architecture
Aster is a multi-language SDK built around a shared Rust engine. The Rust facade and language bindings expose typed services, while Rust implements the transport, RPC dispatch, wire envelopes, and shared security checks.
For a remote worker reporting status to an operator, the language API owns the application’s types and handler. The Rust engine routes and checks the call. Iroh carries it to the authenticated endpoint. This split lets language bindings share network behavior while retaining their own runtime and cleanup rules. Start with what is Aster if these subsystems are new to you.
Follow one RPC call
Section titled “Follow one RPC call”- The caller’s typed API encodes a request using the registered payload schema.
- Its native bridge passes the call to Rust; Iroh connects to the expected
endpoint key using the RPC ALPN,
aster/1. - A call stream carries an AEv1 header and the encoded payload. The header identifies the service, method, and any session.
- The Rust dispatcher validates routing, serialization mode, session rules, declared capabilities, and deadlines before invoking the application handler.
- The binding runs the handler in its language runtime. The response payload and status return over the call stream; failures surface through the binding’s error API.
Admission must already have supplied a verified policy context for protected calls. Endpoint authentication alone supplies no application role. See the trust model for allowed and denied requests.
SDK layers
Section titled “SDK layers”- Rust facade (
aster) provides the Rust RPC API, dispatch, transport adapters, and native-stack access. - Language APIs adapt service definitions, handler calls, and payload types to Python, TypeScript, Go, Java, and .NET.
- Native bridges use PyO3, NAPI-RS, or the C ABI to connect language runtimes to the Rust engine.
- Transport core manages endpoints, protocol routing, framing, canonical contracts, and Iroh data operations.
- Iroh provides authenticated QUIC connectivity, relay support, blobs, document replication, and gossip.
For example, the Python server uses Rust dynamic dispatch for header decoding, method lookup, serialization checks, session rules, capabilities, and deadlines. Python runs the application handlers and its interceptor chain.
One endpoint, multiple protocols
Section titled “One endpoint, multiple protocols”The Iroh router selects a protocol handler using the connection’s ALPN. RPC, admission, blobs, documents, and gossip can share an endpoint identity and network configuration. Different ALPNs use separate QUIC connections; an RPC connection does not carry blob or gossip streams.
The core’s AsterQueueHandler routes custom-protocol connections into a bounded channel. The shared Rust RPC runtime accepts and dispatches RPC traffic. Applications can also register custom protocols through the native APIs.
Async execution
Section titled “Async execution”Rust executes asynchronous network operations on Tokio. Python’s PyO3 bridge exposes awaitables, and the TypeScript NAPI-RS bridge exposes promises. The C ABI exposes handles and completion events for other bindings. Application handlers follow their binding’s concurrency model.
Ownership and concurrency
Section titled “Ownership and concurrency”The server runtime owns its network tasks; the application owns handler work and any external resources the handler acquires. Separate call streams can invoke a shared instance, or the same session instance, concurrently. The application must coordinate mutable state and cooperate with cancellation. Closing a native handle is not a universal substitute for awaiting application cleanup. Follow the chosen binding’s server and client references.
Contracts and payloads
Section titled “Contracts and payloads”The framework derives a canonical descriptor from a service definition and hashes it with BLAKE3. The resulting contract_id identifies that descriptor across bindings. Method names, wire types, and canonical settings must agree; the ID does not verify application behavior.
See contract identity for canonical encoding and serialization for payload settings.
RPC framing
Section titled “RPC framing”Headers and status trailers use AEv1, a binary encoding independent of Fory. Request and response payloads use Fory XLANG for cross-language calls. Frames carry a length and flags, including HEADER (0x04), TRAILER (0x02), and COMPRESSED (0x01). Payloads strictly larger than 4096 bytes are compressed by default.
Session-scoped services use connection-scoped session IDs across call streams. They do not require one persistent stream per service instance. See session-scoped services.
Deployment identity
Section titled “Deployment identity”A node’s secret key determines its endpoint identity. Enrollment credentials and method capability requirements provide deployment authorization under the configured root key. Operator profiles and identity files are configuration mechanisms; they must be protected according to the keys and credentials they contain.
Development settings are permissive. Read the trust model and configuration reference before deploying access-controlled services.
Data and consistency
Section titled “Data and consistency”Blobs store immutable content, documents replicate signed entries, and gossip carries live notifications. Coordination provides an optional replicated serialization point for critical mutable state. Topology supplies placement observations, while leases require fences in the protected resource’s write path.
Salvo supplies the optional HTTP RPC transport and the public exposure edge. Those are separate integrations with different protocol and authentication boundaries.
Continue with operations or the language and release matrix.