Relative Content

Tag Archive for rustwasm-bindgen

Can a WebAssembly::Memory SharedArrayBuffer be read as a slice without copying?

Context I wrote a small genetics library in JavaScript for a browser-based game. The library consists of entirely static methods that operate on typed arrays. For example: // 2 implies there are 2 variants of this gene (in our case, “A” or “O”): const a_type_blood = Genetics.Gene(2); // Returns: [2] // same as above (“B” […]

Rust: Can a WebAssembly::Memory SharedArrayBuffer be read as a slice without copying?

Context I wrote a small genetics library in JavaScript for a browser-based game. The library consists of entirely static methods that operate on typed arrays. For example: // 2 implies there are 2 variants of this gene (in our case, “A” or “O”): const a_type_blood = Genetics.Gene(2); // Returns: [2] // same as above (“B” […]