News for hackers. Stuff that matters.
Re:Wasm vs. PNaCl Performance Benchmark by ReD_CoDE on Sunday August 25, 2019 @07:20PM (#20796293)
I'm not a programmer, so Wasm is DOM-based or Canvas-based? I mean does it support explicit DOMs?
Re:Wasm vs. PNaCl Performance Benchmark by yoklov on Sunday August 25, 2019 @07:28PM (#20796339)
Neither really. It doesn’t have direct access to a canvas API or to the DOM, but you can proxy calls through javascript. There’s a plan to allow avoiding this overhead, but it’s fairly early.
Re:Wasm vs. PNaCl Performance Benchmark by snek on Sunday August 25, 2019 @11:16PM (#20797203)
Wasm has no concept of a browser, or any outside-world interaction APIs. Wasm hosts can provide APIs, for example emscripten provides bindings to wasm for canvas and networking.
Re:Wasm vs. PNaCl Performance Benchmark by scrungus on Monday August 26, 2019 @12:01AM (#20797377)
I think it depends on how you compile it i think. for example,you can use SDL or something with an emscripten compiler flag [1]. but i am not super sure how that works without canvas, i haven't tried it with normal sdl

web assembly is not necessarily just for the browser though. you can have webassembly without any web[2], just to run binaries across different platforms. i think it's pretty cool

[1] https://timhutton.github.io/sdl-canvas-wasm/

[2] https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webas...

Re:Wasm vs. PNaCl Performance Benchmark by ReD_CoDE on Monday August 26, 2019 @12:58PM (#20801487)
Thanks all