Skip to main content

Crate moirai_transport

Crate moirai_transport 

Source
Expand description

Unified transport layer for Moirai concurrency library.

This module provides transport abstractions that work across different communication boundaries: threads, processes, and machines. It builds on top of the core channel primitives to provide location-transparent messaging.

§Design Principles

  • Location transparency: same API for local and remote communication
  • Zero-copy optimization for local transport
  • Pluggable transport backends (in-memory, IPC, network)
  • Integration with Moirai scheduler for optimal performance

Re-exports§

pub use safe_channel::ArchiveSerialize;
pub use safe_channel::ArchiveView;
pub use safe_channel::ArchivedMessage;
pub use safe_channel::ArchivedUniversalReceiver;
pub use safe_channel::ArchivedUniversalSender;

Modules§

payload
Typed ownership regions for transport archive payload bytes.
process
OS process lifecycle primitives, owned pipes, and bounded cleanup.
remote_task
Remote task envelopes over transport-owned bytes.
safe_channel
Zero-copy archive channel helpers for transport boundaries.

Structs§

ConnectionManager
Tracks the connection state of remote/local endpoints.
InMemoryTransport
In-memory transport for local communication
IpcTransport
Shared-memory same-machine IPC transport (Unix/Windows only). Shared-memory IPC transport. Holds one SharedQueue handle per segment name, created lazily on first use.
MessageRouter
Topic-based pub/sub router that delivers published messages to every subscribed Address over a shared transport.
NetworkListener
A bound endpoint for receiving one length-prefixed network frame.
NetworkTransport
Network transport for distributed communication.
Receiver
Receiver half of MPMC channel
RemoteAddress
Remote address for cross-machine communication
Sender
Sender half of MPMC channel
TransportManager
Transport manager that routes messages to appropriate transport

Enums§

Address
Address for identifying communication endpoints
ConnectionState
Observable state of a tracked connection.
TransportError
Error types for channel operations

Traits§

Transport
Transport trait for different communication mechanisms

Type Aliases§

TransportResult
Result type for transport operations