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§
- Buffer
State - 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.
- Operation
List - A list of imports/exports for a wasmRS module.
- Payload
- A Payload with pre-parsed Metadata.
- Payload
Error - The error type used for all [wasmrs_rx::Mono]/[wasmrs_rx::Flux] payloads.
- RawPayload
- A complete [Payload] object that includes metadata and data bytes.
- Wasm
Socket - A socket that can be used to communicate between a host & guest via the wasmRS protocol.
Enums§
- Error
- Error type for wasmRS RSocket errors.
- Error
Code - RSocket Error Codes Error codes come from https://rsocket.io/about/protocol
- Frame
- An enum that can hold any time of wasmrs frame.
- Operation
Type - The types of RSocket operations supported by wasmRS.
- Socket
Side - Specify the socket side (only used for debugging).
Traits§
- Flux
- A generic trait to wrap over Flux, Mono, and supporting types.
- Module
Host - 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.
- Generic
Error - An alias to [Box<dyn std::error::Error + Send + Sync + ’static>]
- Incoming
Mono - An alias for [Mono<ParsedPayload, PayloadError>]
- Incoming
Stream - An alias for [FluxReceiver<ParsedPayload, PayloadError>]
- Operation
Handler - An alias for the function that creates the output for a task.
- Operation
Map - An alias for a [Vec<(String, String, RtRc
)>] - Outgoing
Mono - An alias for [Mono<Payload, PayloadError>]
- Outgoing
Stream - An alias for [FluxReceiver<Payload, PayloadError>]