Crate ic_wasm_bindgen

Source
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 JavaScript Error 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.
UnwrapThrowExt
An extension trait for Option<T> and Result<T, E> for unwrapping the T 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 externrefs / JsValues in wasm-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.