11 breaking releases

0.13.0 Aug 17, 2023
0.12.0 Jul 26, 2023
0.11.0 Jul 11, 2023
0.6.0 Mar 22, 2023

#1248 in WebAssembly

Download history 4/week @ 2024-02-25 2/week @ 2024-03-10 161/week @ 2024-03-31

163 downloads per month




WasmRS implements reactive streams in WebAssembly modules to enable asynchronous, bidirectional communication in and out of wasm. WasmRS is a spiritual successor to waPC and dramatically expands on what you can do with WebAssembly.

wasmRS Protocol

WasmRS revolves around a handful of methods that allow the host and the guest to write RSocket frames to their respective buffers in WebAssembly memory. The language-specific implementation largely handles the encoding and decoding of these frames with a light UX layer on top and metadata extensions that are relevant to WebAssembly usage.

As in RSocket, wasmRS frames contain a stream ID allowing the destination to differentiate multiple frames for different transactions.

For more information on the protocol, see the wasmRS documentation at the root of this project.


Building & Running tests

The host tests depend on built WebAssembly modules. To build new modules, run the following:

$ just wasm

Build debug versions of the WebAssembly modules (with wasi) using:

$ just debug

Run tests with the command just test:

$ just test

Running example host with guest wasm

The request binary allows you to make simple requests into WebAssembly binaries, passing JSONified data as input, e.g.:

$ cargo run --bin request -- ./build/reqres_component.wasm suite.test reverse '{"input":"abcdefghijklmnopqrstuvwxyz"}'

Enable trace logging

RUST_LOG=wasmrs=trace cargo run --bin request ...

See also

  • nanobus as a way to run wasmRS modules
  • apex to generate wasmrs boilerplate and scaffold projects using wasmrs.




See the root LICENSE.txt


~563K SLoC