wasm-bindgen
wasm-bindgen copied to clipboard
Facilitating high-level interactions between Wasm modules and JavaScript
The [documentation about passing number slices between JS and rust](https://rustwasm.github.io/docs/wasm-bindgen/reference/types/number-slices.html) is a bit confusing to me, because it doesn't make clear whether there are any copies happening when passing such...
### Summary I'd like to create rust binding for something like this: ```typescript export namespace Math { type Vector3 = { "x": number, "y": number, "z": number }; } ```...
I have written an code about getting the svg element imported by embed, but it is failed. Here is the code: ```rust html! { } ``` I can get the...
I've been going through the [rust wasm book](https://rustwasm.github.io/docs/book/game-of-life/) and I've gotten stuck on a problem. ### Summary I'm have an issue where `memory` ```ts import {memory} from "wasm-rust/index_bg"; ``` is...
rust version: rustc 1.52.0-nightly (a143517d4 2021-02-16) wasm-bindgen: 0.2.71 wasm-bindgen-cli: 0.2.71 ```rust use wasm_bindgen::prelude::*; #[wasm_bindgen] pub fn greet(_name: &str) { } ``` With the above code and cdylib crate-type, I can...
Hi folks! This feature was discussed in the past in other issues, but it's been quiet for a while and there hasn't been an issue dedicated specifically to this feature,...
### Describe the Bug If two JS functions bound via the FFI are given the same Rust name across different Rust modules, there will be clashes at runtime leading to...
### Describe the Bug When memory usage exceeds 2GB, the glue code generated by wasm-pack reads the wrong address. ### Steps to Reproduce The following program uses 3GB of memory....
### Motivation As far as I understand, the only way to return an object with a duck-typed interface from Rust to JS for the time being is to build it...
### Describe the Bug Can not find the api of `URL` in web_sys and js_sys. Is it defined in wasm-bindgen? ### dependiences wasm-bindgen = "0.2"