wasm-bindgen
wasm-bindgen copied to clipboard
Improve documentation about unstable JavaScript APIs
Hello,
Thanks for the great set of crates - they're phenomenally useful. I was looking to use the Temporal API. I figured it out (answer at the bottom) by reading the source code, but I imagine some explicit documentation would help newcomers a lot. I'd be happy to submit a small PR documenting the different ways to activate the unstable APIs of JavaScript if that makes sense!
PS here's how to do it:
Option 1 (my recommendation): Add configuration flags to .cargo/config.toml:
[build]
rustflags = ["--cfg", "js_sys_unstable_apis"]
Option 2 - Pass configuration flags to rustc on the command-line:
RUSTFLAGS='--cfg js_sys_unstable_apis' cargo build
happy to submit a small PR
welcome!