WebAssembly: A Foundation for a Higher Performance Web
- Simplified porting: WebAssembly is a compilation target, similar to x86 or ARM. This means that existing applications and libraries can be ported to WebAssembly just as easily as porting them to any other target. Entire C++ applications can be ported to WebAssembly to run in a browser at near-native speeds, with very little rewriting of the application code.
Porting applications to WebAssembly
One of the advantages of WebAssembly being a compilation target is that existing applications don’t need to be entirely rewritten to be ported to the web. In fact, porting a Windows application to WebAssembly is supposed to be about as difficult as porting that same application to Linux. If an application is written in a language that supports WebAssembly, then most of the core components can be converted directly to WebAssembly modules. The biggest component that cannot be converted is the UI. However, if the application is already cross-platform, then the UI is most likely already abstracted from the core components in a way that allows for easy replacement. This means that basically all non-UI components can be easily ported to WebAssembly. For example, when AutoCAD was ported to WebAssembly, upwards of 95% of the existing codebase could be ported directly.
WebAssembly has the potential to be a disruptive force in web development. Finally, web developers are gaining access to a more complete share of the resources modern computers have to offer. So far only version 1.0 has shipped, and that has already allowed large native applications like AutoCAD to be ported to the browser. As WebAssembly improves and is more widely adopted, we should all be enjoying a faster, more powerful, web.