4 ms·
> For some reason I thought wasm code could be a SharedArrayBuffer. And I thought that would be mutable. No, this was an explicit design decision for security
by kodablah 5y ago
> For some reason I thought wasm code could be a SharedArrayBuffer. And I thought that would be mutable.
No, this was an explicit design decision for security reasons. Data is mutable, but you cannot exec it.
> You might maybe have to round trip back to JS to modify this?
Yes, this is technically possible but you're unlikely to see savings. I'd suspect a "JIT" that instantiates a WASM via the JS API using generated bytes from another WASM call won't help much (the "exports" would have to be JS calls too or you'd have to re-instantiate all the WASMs together to link exports).
- deleted 5y ago[deleted]