Skip to main content

Crate wasm_bindgen_macro_support

Crate wasm_bindgen_macro_support 

Source
Expand description

This crate contains implementation APIs for the #[wasm_bindgen] attribute.

Re-exports§

pub use parser::BindgenAttr;
pub use parser::BindgenAttrs;
pub use parser::JsNamespace;

Modules§

ast
A representation of the Abstract Syntax Tree of a Rust program, with all the added metadata necessary to generate Wasm bindings for it.
parser

Structs§

Diagnostic
A struct representing a diagnostic to emit to the end-user as an error.
ParseOutput
Parsed upstream macro-support AST plus Rust tokens preserved by the parser.

Functions§

expand
Takes the parsed input from a #[wasm_bindgen] macro and returns the generated bindings
expand_class_marker
Takes the parsed input from a #[wasm_bindgen] macro and returns the generated bindings
expand_link_to
Takes the parsed input from a wasm_bindgen::link_to macro and returns the generated link
expand_struct_marker
parse
Parse a #[wasm_bindgen] input item into the upstream macro-support AST.
parse_class_marker
Parse an internal class marker method into the upstream macro-support AST.
parse_class_marker_with_tokens
Parse an internal class marker method into the upstream macro-support AST and return the method tokens preserved by the upstream parser.
parse_link_to
Parse a wasm_bindgen::link_to! input into its module AST.
parse_struct
Parse a struct body through the upstream exported-struct converter.
parse_with_tokens
Parse a #[wasm_bindgen] input item into the upstream macro-support AST and return the Rust tokens the upstream parser preserves.