wasm-bindgen
wasm-bindgen copied to clipboard
Facilitating high-level interactions between Wasm modules and JavaScript
### Describe the Bug In version 0.2.95, any function returning a `Result` will cause the generated typescript function to return `Array` (note that it's not `Array`, just `Array`). The problem...
### Summary How I can attach a debugger to the CLI for tests. I want to debug the JS code gen part but couldn't find any docs for debugging. I'm...
I renamed `result-string.rs` -> `result.rs` and added 2 more functions for testing. This also shows that #4207 is not a `wasm_bindgen` issue per se.
fixes #2313 This adds support for enums with negative discriminants and slightly improves error messages. Honestly, implementing this was pretty simple. I don't have too much to say about this,...
All functions with `Option` arguments take both `undefined` and `null` and generally treat them as equivalent ([see `isLikeNone`](https://github.com/rustwasm/wasm-bindgen/blob/3a8da7cb8842d4cb9918871179b6b7d3c77df5a0/crates/cli-support/src/js/mod.rs#L2181)). Despite both `undefined` and `null` being accepted, the generated type definitions only...
### Motivation Right now, incoming slices and vectors are typed as `T[]` or `UInt8Array` and similar for primitives. This is unnecessarily restrictive. Even today, all function taking slices and vectors...
Enums are now formatted with each variant on its own line. This makes enum definitions easier to read. It also allowed me to remove the hard-coded enum detection in `reset_indentation`,...
While working on #4201, I had the idea to test how wasm bindgen handles getter-setter pairs with different types. Not well was the answer. This PR completely changes how the...
fixes #4113 This adds support for regular JS numbers (think `typeof x === 'number'`) as values for `u64` and `i64` parameters. This should makes Rust APIs taking large numbers more...
### Motivation So I was working with WebRTC Media Stream Track and was cloning with with `.clone()` thinking it'll do shallow clone just like how all other web-sys api does...