4 ms·
Ok, now we need GC and DOM interop. Because reinventing layouts is pain.
by dmitriid 9y ago
Ok, now we need GC and DOM interop. Because reinventing layouts is pain.
- zaarn 9y agoIIRC you can do GC within WebAssembly (though it's less nice and awkward as I've been told). But DOM interop is needed. Can't wait to get my fingers on the DOM via native C code :)
- lj3 9y agoIt doesn't sound like that will be possible. DOM interop is baked into the Garbage Collection task[0]. It sounds like there's a dependency there, somewhere. [0]: https://github.com/WebAssembly/design/issues/1079 https://github.com/WebAssembly/design/issues/1079 edit: Scratch all of that above. I stand corrected. Here's the DOM proposal: https://github.com/WebAssembly/host-bindings/ https://github.com/WebAssembly/host-bindings/
- steveklabnik 9y agoHistorically, people have thought that the GC and DOM stuff is intertwined, but the latest DOM proposal doesn't require the GC proposal.
- lj3 9y agoDo you have a link to the separated proposals? It certainly seems entwined on the official roadmap.
- steveklabnik 9y agohttps://github.com/WebAssembly/host-bindings/ https://github.com/WebAssembly/host-bindings/
- lj3 9y agoAwesome. Thanks!
- amelius 9y ago> Because reinventing layouts is pain. You could simply compile (relevant parts of) Firefox or Chromium to WASM :)
- singularity2001 9y agoI wished 'lol' was an appropriate response on hacker nws
- amelius 9y agoIn order to port other languages (Haskell, Go, Python) to target WASM, we definitely need the possibility of writing a GC in WASM. But to build an efficient GC, we need multithreading and synchronization/memory barrier primitives.
- bartwe 9y agoMulti threading brings in all kinds of security issues
- singularity2001 9y agoeven in the very sandboxed context of WebAssembly?
- exDM69 9y agoBut without multithreading, you can use 1/4th or 1/8th of the computation power available on your average consumer device. What kind of issues are you thinking about? Multithreading is not easy but your typical race conditions and multi threaded problems aren't really opening doors to any new security exploits. Browsers and WASM have quite decent sandboxing to mitigate security issues. There's WebWorkers already which brings a limited form of threads to the browser. I'm not seeing a problem with multiple threads in a browser.
- marcosdumay 9y agoWhat kinds of security issues? I really can't think of any besides some issues with too many threads spawned (that can be trivially blocked).
- oconnor663 9y agoCould be a new source of undefined behavior and memory exploits, if threaded code is allowed to access collections that allocate memory without taking all the locks they should?
- 9y ago
- apignotti 9y agoCheerp is our solution to emit mixed mode WebAssembly/JavaScript from the same C++ codebase. It generates bridges to JS code transparently to work around the interoperability limitations of WebAssembly. https://github.com/leaningtech/cheerp-meta/wiki/Cheerp-Tutorial:-Mixed-mode-C---to-WebAssembly-and-JavaScript https://github.com/leaningtech/cheerp-meta/wiki/Cheerp-Tutor...