Rust WASM-bindgen rules for interfacing with aspect-build/rules_js

Rules

js_rust_wasm_bindgen

load("@rules_js_rust_wasm_bindgen//:defs.bzl", "js_rust_wasm_bindgen")

js_rust_wasm_bindgen(name, bindgen_flags, out_name, target, target_arch, wasm_file)

Generates javascript and typescript bindings for a webassembly module using wasm-bindgen that interface with aspect-build/rules_js.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
bindgen_flagsFlags to pass directly to the wasm-bindgen executable. See https://github.com/rustwasm/wasm-bindgen/ for details.List of stringsoptional[]
out_nameSet a custom output filename (Without extension. Defaults to target name).Stringoptional""
targetThe type of output to generate. See https://rustwasm.github.io/wasm-bindgen/reference/deployment.html for details.Stringoptional"bundler"
target_archThe target architecture to use for the wasm-bindgen command line option.Stringoptional"wasm32"
wasm_fileThe .wasm crate to generate bindings for.Labelrequired