Chapter 3. WebAssembly in Practice

WebAssembly is a very new technology, with support announced for “all major browsers” as recent as November 2017. Since then, a great many companies and enthusiastic developers have been experimenting with this technology, creating fascinating and exciting prototypes. However, there are a small number of companies who are already using this technology in production. This chapter takes a look at some of the WebAssembly early adopters and what they are doing with this technology.

Computer Aided Design: AutoCAD

AutoCAD is a very popular Computer Aided Design (CAD) package that supports engineers, architects, and designers across a wide range of industries. The first version of AutoCAD was written in C++ and released in 1982, which makes it more than 10 years older than JavaScript!

In 2010, the AutoCAD team launched a web-based version of its desktop AutoCAD tool using the Flash plug-in, later replacing it with HTML5/JavaScript. However, in both cases the web version of AutoCAD had a limited feature set, for the most part due to the prohibitive cost of migrating a 12-million-lines-of-code application to the web.

The AutoCAD team immediately saw the promise of WebAssembly when it was released in 2017, and sought to use Emscripten to compile its desktop C++ codebase and run it in the browser. Early experiments proved very successful, and the WebAssembly-based version of the product was announced at Google’s I/O conference in 2018.

This C++ core running ...

Get What Is WebAssembly? now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.