3 ms·
I think the author is viewing WebAssembly strictly in the context of using it inside of a web browser on a web page. The problem with that view is that WebAsse
by riskable 4y ago
I think the author is viewing WebAssembly strictly in the context of using it inside of a web browser on a web page. The problem with that view is that WebAssembly's goals go far beyond that, being more of a (much more) portable runtime/binary format akin to a Flatpak or AppImage.
In the context of a web browser having low-level access to the client's filesystem (e.g. fd_write) seems like a bad idea/security problem. However, if you're executing WASM from the perspective of, "I'm running this on my desktop" or "this is a microservice I am running on my server" suddenly low-level filesystem access makes a lot more sense.
It's up to the implementation to add controls around or completely restrict things like filesystem access. There's no reason why such features can't be included in the larger standard of WebAssembly. It's similar to .webm being a subset of the Matroska (.mkv) container format... For the web, specifically the folks that defined .webm (Google) decided that they didn't want or need all the features of Matroska.
- pie_flavor 4y agoIt has been painstakingly designed not to be a security problem, and I would really recommend becoming familiar with the APIs in question. Every last I/O function is capability-based; for example, you must have a directory handle in order to open a file or subdirectory in it. Initial handles are provided by the runtime.