Skip to main content

Crate omnia_wasi_messaging

Crate omnia_wasi_messaging 

Source
Expand description

§Omnia WASI Messaging

This crate provides the Messaging interface for the Omnia runtime.

§Interface

Implements the wasi:messaging WIT interface.

§Backend

  • Default: In-memory broadcast channel using tokio::sync::broadcast. Messages are only delivered to subscribers within the same process.

§Usage

Add this crate to your Cargo.toml and use it in your runtime configuration:

use omnia::runtime;
use omnia_wasi_messaging::MessagingDefault;

omnia::runtime!({
    "messaging": MessagingDefault,
});

§License

MIT OR Apache-2.0

§WASI Messaging

This module implements a runtime service for wasi:messaging (https://github.com/WebAssembly/wasi-messaging).

Modules§

default_impl
Default in-memory implementation for wasi-messaging

Macros§

omnia_wasi_view
Implementation of the WasiMessagingView trait for the store context.

Structs§

ClientProxy
Proxy for a messaging client.
MessageProxy
Proxy for a message.
MessagingDefault
Default implementation for wasi:messaging.
MessagingRequestReply
Auto-generated bindings for an instance a component which implements the world messaging-request-reply.
Metadata
Metadata associated with a message.
Reply
Reply information for a message.
RequestOptions
Options for messaging requests.
WasiMessaging
Host-side service for wasi:messaging.
WasiMessagingCtxView
View into WasiMessagingCtx implementation and ResourceTable.

Enums§

Error
Errors that can occur when using the messaging interface.

Traits§

Client
Messaging client trait.
Message
Providers implement the Message trait to allow the host to interact with different backend messaging systems.
WasiMessagingCtx
A trait which provides internal WASI Messaging context.
WasiMessagingView
A trait which provides internal WASI Messaging state.

Type Aliases§

FutureResult
Result type for asynchronous operations.
Result
Result type for messaging operations.
Subscriptions
Stream of message proxies.