Crate wsdom

source ·
Expand description

§WSDOM

WSDOM is a roundtrip-free Rust → JavaScript Remote Method Invocation or Distributed Objects system. It lets Rust code hold and manipulate JavaScript objects over the network.

For an overview of what this library does, see the README on GitHub.

Small code examples to help you get started are available on GitHub.

§Documentation

wsdom::dom is the module you will be working with most of the time. This module contains stubs for the Web API (HTMLElement, Canvas, etc.). The stubs were auto-generated so they don’t have documentation attached to them, but you can always look for the item with the corresponding name on MDN.

The wsdom::js module contains stubs for the base JavaScript functionalities (ArrayBuffer, RegExp, etc.). Note that this module is incomplete. I only auto-generated a small subset of the JS API (because the TypeScript typings for these stuff are quite complicated so auto-translating them to Rust is hard).

The js_types module contains JavaScript primitives such as number, string, and object.

Re-exports§

Modules§

  • Interactivity for handling JS events.
  • Stubs for primitive JS types including number, string, null, undefined, object.

Macros§

Structs§

Traits§

  • For converting between JavaScript types.
  • Values that can be serialized to JS code satisfying certain types.

Functions§

  • The return value implements ToJs<JsNullish> and ToJs<JsNullable<T>>.
  • The return value implements ToJs<JsNullish> and ToJs<JsNullable<T>>.