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
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this target. | Name | required | |
bindgen_flags | Flags to pass directly to the wasm-bindgen executable. See https://github.com/rustwasm/wasm-bindgen/ for details. | List of strings | optional | [] |
out_name | Set a custom output filename (Without extension. Defaults to target name). | String | optional | "" |
target | The type of output to generate. See https://rustwasm.github.io/wasm-bindgen/reference/deployment.html for details. | String | optional | "bundler" |
target_arch | The target architecture to use for the wasm-bindgen command line option. | String | optional | "wasm32" |
wasm_file | The .wasm crate to generate bindings for. | Label | required |