4 ms·
Yup there's zero reason this couldn't just output a dom manipulation via FFI into straight JS code. It's fairly straightforward to do with wasm/asm.js.
by vvanders 9y ago
Yup there's zero reason this couldn't just output a dom manipulation via FFI into straight JS code. It's fairly straightforward to do with wasm/asm.js.
- lomnakkus 9y agoJust curious: Has anyone does this yet? Specifically, I'm thinking of something vdom-like with the possibility of callbacks into wasm. Obviously, they would have to go some type of string marshalling and "proxied" IDs for callbacks, but the applications I'm thinking of don't require "huge" performance.
- vvanders 9y agoYup, you call a c function that calls out to JS and then make whatever dom/canvas calls you want.
- lomnakkus 9y agoDo you happen to have a link to an implementation for wasm?
- vvanders 9y agoNot publicly, the emscripten docs covers it in pretty good detail: http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#implement-c-in-javascript http://kripken.github.io/emscripten-site/docs/porting/connec...