Crates You Should Know
You can also browse all the crates published to crates.io in the WebAssemblycategory.
facilitates high-level interactions between Rust andJavaScript. It allows one to import JavaScript things into Rust and export Rustthings to JavaScript.
wasm-bindgen-futures | crates.io | repository
wasm-bindgen-futures
is a bridge connecting JavaSript Promise
s and RustFuture
s. It can convert in both directions and is useful when working withasynchronous tasks in Rust, and allows interacting with DOM events and I/Ooperations.
js-sys | crates.io | repository
Raw wasm-bindgen
imports for all the Web's APIs, such as DOM manipulation,setTimeout
, Web GL, Web Audio, etc.
console_error_panic_hook | crates.io | repository
This crate lets you debug panics on by providing apanic hook that forwards panic messages to console.error
.
console_log | crates.io | repository
This crate provides a backend for that routes logged messages to the devtoolsconsole.
parity-wasm | crates.io | repository
Low-level WebAssembly format library for serializing, deserializing, andbuilding .wasm
binaries. Good support for well-known custom sections, such asthe "names" section and "reloc.WHATEVER" sections.
wasmparser | crates.io | repository
A simple, event-driven library for parsing WebAssembly binary files. Providesthe byte offsets of each parsed thing, which is necessary when interpretingrelocs, for example.
An embeddable WebAssembly interpreter from Parity.