wasm-bindgen <input>

Generate bindings between WebAssembly and JavaScript

Arguments

NameDescription
inputFile name to output the compiled binary bindings

Options

NameDescription
--help, -hShow help for wasm-bindgen
--version, -vShow version for wasm-bindgen
--out-dir <directory>Output directory
--out-name <filename>Set a custom output filename (Without extension. Defaults to crate name)
--target <target>What type of output to generate
--no-modules-global <name>Name of global to assign generated bindings to
--browserHint that JS should only be compatible with a browser
--typescriptOutput a TypeScript definition file (on by default)
--no-typescriptDon't emit a *.d.ts file
--omit-importsDon't emit imports in generated JavaScript
--debugInclude otherwise-extraneous debug checks in output
--no-demangleDon't demangle Rust symbol names
--keep-debugKeep debug sections in wasm files
--remove-name-sectionRemove the debugging `name` section of the file
--remove-producers-sectionRemove the telemetry `producers` section
--omit-default-module-pathDon't add WebAssembly fallback imports in generated JavaScript
--encode-into <option>Whether or not to use TextEncoder#encodeInto()
--nodejsDeprecated, use `--target nodejs`
--webDeprecated, use `--target web`
--no-modulesDeprecated, use `--target no-modules`
--weak-refsEnable usage of the JS weak references proposal
--reference-typesEnable usage of WebAssembly reference types