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

  • Utility functions related to frames.

Structs

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

Enums

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

Traits

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

Type Aliases

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