5 ms·
WebAssembly won't give you unlimited power. You will still have the browser sandboxing and security / privacy policies in place. Accessing to the local file sys
by dmarcos 10y ago
WebAssembly won't give you unlimited power. You will still have the browser sandboxing and security / privacy policies in place. Accessing to the local file system is for instance constrained in the browser for good reasons. WebAssembly apps will be able to do what Web APIs let any page do.
- mstade 10y agoIs this universally true – i.e. baked in to the wasm spec – or is it just true in a browser environment? Consider things like NW.js[1] or Electron[2] – might we see cross platform apps being developed where all or parts of it are written in <insert language here> and compiled to wasm, then packaged up with a runtime and delivered as a "native" application for desktop, mobile, or whatever? [1]: https://nwjs.io https://nwjs.io [2]: https://electron.atom.io https://electron.atom.io
- johncolanduoni 10y agoNo, the wasm spec doesnt mention web standards at all. It can be implemented without a JavaScript VM nearby, and at the moment isn't even capable of interacting with the DOM/JavaScript APIs directly when it is run in web browsers.
- noam87 10y agoWhat would be the benefit of that? Might as well just compile to native and distribute that without all the overhead, no?
- mstade 10y agoI probably should have specified but I was referring to GUI applications specifically. For things without a GUI, or that require deeper system integration than you get with these runtimes you're absolutely right – there's little point. But for a very large class of GUI applications it makes a lot of sense, working with technologies that not only have stood the test of time and are good enough for plenty of use cases, but also mean you can with very little effort package your application for multiple operating systems. Some of these applications will need stronger performance than can be provided by the JS engine, so hence the question re: wasm. Does that make more sense?
- flukus 10y agoNot a problem, we can just wait for the inevitable security vulnerabilities.
- pcwalton 10y agoIf it's "not a problem", it should be easy to write a Web page that opens calc.exe. Can you do that? Can anyone on HN do that?
- comex 10y agoI think the parent was joking. Though there are people on HN who can do that, given some development time, like me.
- eeZah7Ux 10y agoReceiving megabytes of untrusted blobs of compiled code from websites? Perhaps even DRM encrypted? What could possibly go wrong. At least js could be unminified and many standard libraries are somewhat trusted.