Is it possible to efficiently modify the html5 canvas from web assembly?
Update:
var imageData = context.getImageData(x, y, w, h)
var buffer = imageData
WebAssembly instances typically have a linear memory area which is exposed to the JavaScript API as an arraybuffer. This can either be allocated in JS and passed in when the WebAssembly instance is created, or the WebAssembly instance can create it and export it to the JS code. Either way the arraybuffer can be used to efficiently copy data into and out of a Canvas element (using createImageData, getImageData and putImageData).