Skip to main contentModule wasm_export
Source - Shim ๐
- What the shim needs beyond the functionโs own signature.
- apply_wasm_only ๐
- Applies
#[wasm_only], if present, returning the JS-facing name. - build_shim ๐
- Builds the wasm shim for one method or free function.
- check_exportable ๐
- Rejects a generic item, which wasm_bindgen cannot export, and a leftover
#[wasm_bindgen]. - take_shim ๐
- Builds one functionโs shim, moving the
#[wasm_bindgen(..)] it declares onto that shim. - wasm_export ๐
- Generates wire-converting
#[wasm_bindgen] shims alongside the original item, which is left as
written for Rust and UniFFI consumers. - wasm_export_fn ๐
#[wasm_export] on a free function: the original is untouched, and a sibling shim is generated.- wasm_export_impl ๐
#[wasm_export] on an impl block: a second impl block of shims is generated beside it.- wasm_only_note ๐
- Reads the deprecation note from
#[wasm_only] / #[wasm_only(note = "...")].