The last talk I attended at Philly ETE was by Luke Wagner on WebAssembly, which is an intermediate assembly language for browsers to use. There are conceptually equivalent technologies in .NET and the JVM, so this isn’t a totally novel field. .NET in particular has a very complex security model – WebAssembly will too, but in completely different ways.
At one point I played with a project called EmbroiderModder, which lets you write files in formats for embroidery machines – Enscripten allows this to be run from within Node or a browser. Other example use cases include SQL Lite, reading AutoCAD files, C crypto libraries, language detection and mapping.
WebAssembly is the final piece of this: a unified specification for browser bytecode. This has to work across multiple processor types, so some WebAssembly commands might translate to one instruction on x86 and two on ARM, etc. WebAssembly also requires certain commands to translate into multiple instructions to protect the user against security issues. Currently there is some limited support in Chrome, Firefox, and Edge.
This suite of tools exposes a problem with browser tooling- if you deploy code that runs bytecode in a browser, you want to be able to step through the original source, but for something like Unity this is potentially multiple gigabytes of source maps. My current experience with these is that they can be a bit flaky, especially when large, so hopefully this motivates improvements in this area (at least in Firefox).
Mozilla is also considering options for how to render the bytecode as text – right now everything renders as “s-expressions”, which basically look like Scheme.
Also of interest, there is an experimental polyfill for asm.js in development.
This is an interesting and complex topic that potentially will have a large impact on developers in the future. If nothing else, it helps to explain the complexity of a browser: these have going from rendering a simple document, to an entire platform like .NET or the JVM, while also bundling sizable developer tools, and being subject to significant security constraints.