Skip to main content

Crate wasm_bindgen_shared

Crate wasm_bindgen_shared 

Source

Modules§

identifier
tys

Macros§

shared_api

Constants§

SCHEMA_VERSION

Functions§

crate_hash
Extract the crate hash from a unique_crate_identifier, which is encoded as "{crate_name}-{hash}" (the hash contains no -).
dynamic_union_variant
escape_string
free_function
free_function_export_name
mangled_symbol
Append the per-crate hash to a wasm shim symbol so that identically named exports from different crates (or different versions of one crate) cannot collide at link time. The macro emits every export shim under this mangled name; cli-support recomputes it from the hash carried in Program::unique_crate_identifier and renames the export back to its canonical name once matched.
new_function
qualified_name
Compute a “qualified name” by prepending the namespace (joined with __) to the js_name. When there is no namespace, this returns the js_name unchanged. This is used to disambiguate internal wasm symbols when the same js_name appears in different namespaces. __ is used as the separator because double underscores are unlikely to appear in user-defined names.
struct_field_get
struct_field_set
struct_function_export_name
unwrap_function
upcast_function
Symbol name of the wasm export that upcasts a *const WasmRefCell<Child> pointer to a cloned Rc<WasmRefCell<Parent>> raw pointer. Used by the macro codegen and by cli-support’s JS emission to call each other.
version