wasm-bindgen
wasm-bindgen copied to clipboard
Facilitating high-level interactions between Wasm modules and JavaScript
### Motivation I was using a client-side framework that imported wasm-bindgen and it threw several deprecation errors despite having `wasm-bindgen = "0.2.87"` specified in several Cargo.toml files. I feel like...
### Describe the Bug I have the following code: ```rust use wasm_bindgen::prelude::wasm_bindgen; #[wasm_bindgen(module = "/assets/hello.esm.js")] extern "C" { #[wasm_bindgen(js_name = sayHello)] pub fn say_hello(); } ``` ```js export function sayHello()...
### Describe the Bug A clear and concise description of what the bug is. ### Steps to Reproduce Using a particular WASM file (I've attached it, but I understand that...
When I define a test like ```rs #[cfg(target_arch = "wasm32")] #[wasm_bindgen_test] async fn screen_example() { // ... } ``` in my wasm-bindgen module `screening_wasm/src/lib.rs`, the resulting `screening_wasm/pkg/screening_wasm.d.ts` contains ```ts //...
### Describe the Bug Rust-analyzer internally throws errors when web-sys is used. See https://github.com/rust-lang/rust-analyzer/issues/18090 ### Steps to Reproduce 1. Add web_sys as a dependency 2. Use it 3. Look at...
This fixes [`#[warn(clippy::precedence)]`](https://rust-lang.github.io/rust-clippy/master/index.html#precedence) as well as warnings for `extern declarations without an explicit ABI are deprecated` in nightly toolchains.
### Summary I am building a relatively simple wasm using wasm-bindgen 0.2.99 and run is via Vite-React on Chrome, where I expose the following rust structs to JS through wasm-bindgen:...
### Describe the Bug I'm getting a filestream from Nodejs for which I want to get the writer from and write something to it. However, when I try to get...
I'm trying to install wasm-bindgen-cli on my workflow file https://github.com/gents83/INOX/actions/runs/13087936821/workflow > cargo install -f wasm-bindgen-cli > shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'" > env: > CARGO_TERM_COLOR: always > CARGO_TARGET_DIR: ./crates/target...
### Summary All js class bindings come with a `free()` method, which frees up the memory allocated for them when they are instantiated, let's say there is a loop on...