Crate wasmrs

Source
Expand description

§wasmrs

WasmRS is an implementation of Reactive Streams for WebAssembly modules that allows hosts & guests to communicate via asynchronous, bidirectional streams.

The wasmrs crate is the base implementation of the bidirectional WebAssembly socket.

§Usage

See wasmrs-guest, wasmrs-host, and wasmrs-wamtime for examples on how to use wasmrs directly.

§More Information

For more information on wasmRS, see the core wasmrs crate.

WasmRS makes heavy use of generated code from apex specs and generators to automate all of the boilerplate. See the getting-started for usage.

§Contributing

See CONTRIBUTING.md

§License

See the root LICENSE.txt

Modules§

util
Utility functions related to frames.

Structs§

BufferState
The implementation of a WasmRS buffer where frames are written to and read from.
Handlers
A list of all the operations exported by a wasmrs implementer.
Metadata
Metadata associated with the frame.
Operation
An operation record.
OperationList
A list of imports/exports for a wasmRS module.
Payload
A Payload with pre-parsed Metadata.
PayloadError
The error type used for all [wasmrs_rx::Mono]/[wasmrs_rx::Flux] payloads.
RawPayload
A complete [Payload] object that includes metadata and data bytes.
WasmSocket
A socket that can be used to communicate between a host & guest via the wasmRS protocol.

Enums§

Error
Error type for wasmRS RSocket errors.
ErrorCode
RSocket Error Codes Error codes come from https://rsocket.io/about/protocol
Frame
An enum that can hold any time of wasmrs frame.
OperationType
The types of RSocket operations supported by wasmRS.
SocketSide
Specify the socket side (only used for debugging).

Traits§

Flux
A generic trait to wrap over Flux, Mono, and supporting types.
ModuleHost
A trait that defines the interface for a wasmRS module host.
RSocket
A trait for an RSocket client/server (host/guest).

Type Aliases§

BoxFlux
A utility type for a boxed stream.
BoxMono
A utility type for a boxed future.
GenericError
An alias to [Box<dyn std::error::Error + Send + Sync + ’static>]
IncomingMono
An alias for [Mono<ParsedPayload, PayloadError>]
IncomingStream
An alias for [FluxReceiver<ParsedPayload, PayloadError>]
OperationHandler
An alias for the function that creates the output for a task.
OperationMap
An alias for a [Vec<(String, String, RtRc)>]
OutgoingMono
An alias for [Mono<Payload, PayloadError>]
OutgoingStream
An alias for [FluxReceiver<Payload, PayloadError>]