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§

pub use wsdom_dom as dom;
pub use wsdom_javascript as js;

Modules§

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

Macros§

load_custom_ts

Structs§

Browser
A WSDOM client.

Traits§

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

Functions§

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