| ▲ | rafram 5 days ago |
| > finally, a run-anywhere platform? (what the JVM and .Net always wanted to be) WebAssembly doesn’t include a system interface, i.e., any way to interact with the outside world, so it isn’t an apples-to-apples comparison. WASI seems like it’s coming along nicely, but it has nowhere near the feature set of the JRE or .NET. Anything that even approaches that level of capability is going to run into the exact same bloat and platform compatibility problems that those runtimes did. |
|
| ▲ | johannes1234321 5 days ago | parent | next [-] |
| > WebAssembly doesn’t include a system interface, i.e., any way to interact with the outside world This can be quite an improvement for running add-ons from some arbitrary source. While, of course, an way to access defined resources is needed. |
| |
| ▲ | rafram 4 days ago | parent [-] | | Sure, but your add-ons will need access to some of the world, which right now requires giving them access to all of WASI, as far as I know. There’s no permissions model. That’s worse than the JVM. (It seems like they want to implement one… someday. It’s vague: https://github.com/bytecodealliance/wasmtime/blob/main/docs/...) | | |
| ▲ | flohofwoe 4 days ago | parent [-] | | A game which uses WASM plugins for modding would define its own 'system interface', basically an extremely restricted API to only access moddable game features but not allow access to any 'operating system services'. It's very similar to how games would use a restricted subset of Lua which can only call into scripting APIs provided by the game, but not use random Lua stdlib features (like reading/writing files). |
|
|
|
| ▲ | 01HNNWZ0MV43FF 5 days ago | parent | prev | next [-] |
| > WebAssembly doesn’t include a system interface, i.e., any way to interact with the outside world I believe that's WASI, which builds on top of the base wasm spec: https://wasi.dev/interfaces#presentation e.g. the WASI 0.2 spec here mentions clocks, filesystem access, creating sockets, etc. Lua is architected the same way - As host, you create a Lua VM with no I/O, and then the host decides which I/O interfaces the VM can or cannot see. JRE and .NET are probably built the same way internally. The reason wasm is hyped more than VMs with a decade of momentum behind them is that wasm is lower-level, it isn't tied to any particular GC model, and there's already backends for popular low-level languages like C, C++, Rust, and Go to compile into wasm modules. |
| |
| ▲ | pjmlp 4 days ago | parent | next [-] | | Like this? "More than 20 programming tools vendors offer some 26 programming languages — including C++, Perl, Python, Java, COBOL, RPG and Haskell — on .NET." From https://news.microsoft.com/source/2001/10/22/massive-industr... "The Amsterdam Compiler Kit (ACK) is a retargetable compiler suite and toolchain written by Andrew Tanenbaum and Ceriel Jacobs, since 2005 maintained by David Given.[1] It has frontends for the following programming languages: C, Pascal, Modula-2, Occam, and BASIC." "Maximum portability is achieved by using an intermediate language using bytecode, called EM. Each language front-end produces EM object files, which are then processed through several generic optimisers before being translated by a back-end into native machine code. " From https://en.wikipedia.org/wiki/Amsterdam_Compiler_Kit "When IBM i was first released as OS/400, it was split into two layers, the hardware-dependent System Licensed Internal Code (SLIC)[15][1] and the hardware-independent Extended Control Program Facility (XPF).[16][8][33][34] These are divided by a hardware abstraction layer called the Technology Independent Machine Interface (TIMI). Later versions of the operating system gained additional layers, including an AIX compatibility layer named Portable Application Solutions Environment (originally known as the Private Address Space Environment),[5][35] and the Advanced 36 Machine environment which ran System/36 SSP applications in emulation.[1]" From https://en.wikipedia.org/wiki/IBM_i#Technology_Independent_M... Other examples can be retrieved from annals of history. | | | |
| ▲ | rafram 4 days ago | parent | prev [-] | | Yes, I discussed WASI in my comment. It has maybe 1% of the feature set of the JRE/.NET core libraries, and I think that’s a generous estimate. |
|
|
| ▲ | flohofwoe 4 days ago | parent | prev | next [-] |
| > WebAssembly doesn’t include a system interface, i.e., any way to interact with the outside world, so it isn’t an apples-to-apples comparison. For a plugin system this sort of isolation from the outside world is pretty much a hard requirement. You don't want random plugins to read/write/delete random files in your filesystem. |
|
| ▲ | euroderf 5 days ago | parent | prev [-] |
| > JRE or .NET. Anything that even approaches that level of capability is going to run into the exact same bloat and platform compatibility problems Challenge has been accepted. Let's see. |