Expand description
Runtime support for the wasm-bindgen
tool
This crate contains the runtime support necessary for wasm-bindgen
the
attribute and tool. Crates pull in the #[wasm_bindgen]
attribute through
this crate and this crate also provides JS bindings through the JsValue
interface.
Modules§
- closure
- Support for long-lived closures in
wasm-bindgen
- convert
- This is mostly an internal module, no stability guarantees are provided. Use at your own risk.
- prelude
- A module which is typically glob imported.
Macros§
- link_to
- This macro takes a JS module as input and returns a URL that can be used to access it at runtime.
Structs§
- Clamped
- A wrapper type around slices and vectors for binding the
Uint8ClampedArray
array in JS. - JsError
- Convenience type for use on exported
fn() -> Result<T, JsError>
functions, where you wish to throw a JavaScriptError
object. - JsStatic
- Wrapper type for imported statics.
- JsValue
- Representation of an object owned by JS.
Traits§
- JsCast
- A trait for checked and unchecked casting between JS types.
- Unwrap
Throw Ext - An extension trait for
Option<T>
andResult<T, E>
for unwrapping theT
value, or throwing a JS error if it is not available.
Functions§
- __
wbindgen_ ⚠add - __
wbindgen_ ⚠as_ number - __
wbindgen_ ⚠bigint_ from_ i64 - __
wbindgen_ ⚠bigint_ from_ i128 - __
wbindgen_ ⚠bigint_ from_ str - __
wbindgen_ ⚠bigint_ from_ u64 - __
wbindgen_ ⚠bigint_ from_ u128 - __
wbindgen_ ⚠bigint_ get_ as_ i64 - __
wbindgen_ ⚠bit_ and - __
wbindgen_ ⚠bit_ not - __
wbindgen_ ⚠bit_ or - __
wbindgen_ ⚠bit_ xor - __
wbindgen_ ⚠boolean_ get - __
wbindgen_ ⚠cb_ drop - __
wbindgen_ ⚠checked_ div - __
wbindgen_ ⚠copy_ to_ typed_ array - __
wbindgen_ ⚠debug_ string - __
wbindgen_ ⚠describe - __
wbindgen_ ⚠describe_ closure - __
wbindgen_ ⚠div - __
wbindgen_ ⚠error_ new - __
wbindgen_ ⚠exports - __
wbindgen_ ⚠externref_ heap_ live_ count - __
wbindgen_ ⚠function_ table - __
wbindgen_ ⚠ge - __
wbindgen_ ⚠gt - __
wbindgen_ ⚠in - __
wbindgen_ ⚠is_ array - __
wbindgen_ ⚠is_ bigint - __
wbindgen_ ⚠is_ falsy - __
wbindgen_ ⚠is_ function - __
wbindgen_ ⚠is_ null - __
wbindgen_ ⚠is_ object - __
wbindgen_ ⚠is_ string - __
wbindgen_ ⚠is_ symbol - __
wbindgen_ ⚠is_ undefined - __
wbindgen_ ⚠json_ parse - __
wbindgen_ ⚠json_ serialize - __
wbindgen_ ⚠jsval_ eq - __
wbindgen_ ⚠jsval_ loose_ eq - __
wbindgen_ ⚠le - __
wbindgen_ ⚠lt - __
wbindgen_ ⚠memory - __
wbindgen_ ⚠module - __
wbindgen_ ⚠mul - __
wbindgen_ ⚠neg - __
wbindgen_ ⚠not - __
wbindgen_ ⚠number_ get - __
wbindgen_ ⚠number_ new - __
wbindgen_ ⚠object_ clone_ ref - __
wbindgen_ ⚠object_ drop_ ref - __
wbindgen_ ⚠pow - __
wbindgen_ ⚠rem - __
wbindgen_ ⚠rethrow - __
wbindgen_ ⚠shl - __
wbindgen_ ⚠shr - __
wbindgen_ ⚠string_ get - __
wbindgen_ ⚠string_ new - __
wbindgen_ ⚠sub - __
wbindgen_ ⚠symbol_ anonymous_ new - __
wbindgen_ ⚠symbol_ named_ new - __
wbindgen_ ⚠throw - __
wbindgen_ ⚠try_ into_ number - __
wbindgen_ ⚠typeof - __
wbindgen_ ⚠unsigned_ shr - exports
- Returns a handle to this wasm instance’s
WebAssembly.Instance.prototype.exports
- externref_
heap_ live_ count - Get the count of live
externref
s /JsValue
s inwasm-bindgen
’s heap. - function_
table - Returns a handle to this wasm instance’s
WebAssembly.Table
which is the indirect function table used by Rust - intern
- Interns Rust strings so that it’s much faster to send them to JS.
- memory
- Returns a handle to this wasm instance’s
WebAssembly.Memory
- throw_
str - Throws a JS exception.
- throw_
val - Rethrow a JS exception
- unintern
- Removes a Rust string from the intern cache.