Expand description
Build tool for packaging Rust crates as npm WASM packages with TypeScript and Flow types.
Produces .js, .d.ts, and .js.flow output files from Rust-defined descriptors,
one set per source file stem. Feature-gated: ts for TypeScript/JavaScript, flow for Flow.
Macros§
- bundle
- wasm_
peers - Generate
#[test] fn generate_npm_files()that writes.d.tsand/or.js.flowoutput files depending on enabled features.
Structs§
- Interface
- An interface not modeled as a Rust struct (e.g. ad-hoc WASM return shapes).
- Opaque
Type - An opaque type declaration for Flow.
- Type
Alias - A type alias (e.g.
export type AttrOp = PredicateOp). - WasmFn
- A WASM-exported function descriptor.
Functions§
- file_
to_ stem - Convert a
file!()path to a camelCase output file stem. - generate_
index_ dts - Generate
{stem}.d.tscontent from type declarations and function descriptors. - generate_
index_ flow - Generate
index.js.flowcontent from type declarations and function descriptors.
Attribute Macros§
- wasm_
export - Mark a pure Rust function as a wasm-js-bridge WASM export.