4 ms·
This very much matches the work I've been doing recently, which aims to remove the architecture-specificity of compiled executables from operating systems by ru
by lachlan-sneff 8y ago
This very much matches the work I've been doing recently, which aims to remove the architecture-specificity of compiled executables from operating systems by running webassembly only.
I see wasm as a step towards this inevitability.
- pjmlp 8y agoArchitecture neutral executables is a thing on mainframes since the late 70's, OS/400, z/OS, UCSD Pascal for example. Then we have JVM, MSIL and DEX. What would wasm bring that isn't already done?
- lachlan-sneff 8y agoThat's true, we've had architecture-independent programming languages/executables for decades. What we haven't had before are architecture-independent executables that can be compiled into from a large number of programming languages.
- pjmlp 8y agoFrom where I am standing, with exception of UCSD Pascal, all those platforms support at least 4 languages and Web Assembly still has a bit to catch up with them regarding its architecture design. So how many languages do they need to be to be considered large? Don't take me wrong, I love those bytecode environments, including Web Assembly. I just don't think Web Assembly is that much different from other ones, other than politics.
- lachlan-sneff 8y agoThey're all garbage collected. Wasm allows you to compile c, c++, rust, plus all those other languages to the same format.
- pjmlp 8y agoYour comment proves you don't know nothing about mainframe bytecode formats, which include support for C and C++, and don't use GC based languages. Look for IBM redbooks on IBM i and IBM z language environments.
- lachlan-sneff 8y agoOh, you're right, I don't. I assumed that they were also gc, but I guess not! How was the performance of the old mainframe formats?
- pjmlp 8y agoPretty ok for their workloads, bytecode is only used as portable executable format. The kernel has a JIT and they are converted into native code at installation time, or when an operator decides to retrigger the operation. In a way, Android (5 - 7), iOS bitcode and WP 8.x MDIL follow similar ideas. And something that I forgot, MSIL also has support for C and C++, hence why all C# 7.x performance improvements don't require any runtime change, just exposing features that C and C++ already make use of on MSIL.
- lachlan-sneff 8y agoHow well do they support software sandboxing?
- pjmlp 8y agoNot sure if I get your point. The mainframe ones, are just like any other OS, code gets generated at installation time, then they are OS processes just like any other. Java and MSIL depend on how they get used. Both have bytecode verifiers, and multiple ways to deploy. Either as single runtime, where strong typing plays the role of sandboxing, or as multiple processes/containers. Just to use .NET as example, not going to make an exhaustive list. .NET Micro Framework deployed on Netduino, the runtime is the OS, only strong typing takes place. .NET Framework on Windows, and .NET Core on Windows/Mac/Linux, each CLR instance gets their own OS process, which might be additionally wrapped into an OS container. .NET Core on UWP, applications run as separate sandboxed process using the UWP sandbox model. Xamarin on iOS runs with the iOS sandbox model, after AOT compiling for deployment. Xamarin on Android, runs with the Android sandbox model where binary code gets dynamically loaded into ART instance, sandboxed via SELinux and Linux container mechanisms. And regarding security, Web Assembly still fails short of preventing memory corruption inside of the loaded module. I was hoping pointers would be tagged, but that doesn't seem to be part of the design goals.