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.
- Parse
Output - 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_tomacro 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.