CppCon 2019: Applied WebAssembly: Compiling and Running C++ in Your Web Browser--Ben Smith

Save to:
Instapaper Pocket Readability

The first videos are becoming available.

Applied WebAssembly: Compiling and Running C++ in Your Web Browser

by Ben Smith

From the video:

WebAssembly is a new technology in all modern browsers designed to let you run high-performance code. Maybe you've heard of WebAssembly before, read an article or two, or even tried to use it with your software project. Since WebAssembly is a low-level language, it's easy to get bogged down in the technical details, and leave without knowing whether WebAssembly will be useful for you. In this talk, I'll take a top-down approach, showing a real problem and how WebAssembly can help.

From August to December this year, I'll be teaching C++ to students at Morehouse College. Having a tool like Compiler Explorer is invaluable as a teaching aid, since it allows the students to immediately see C++ compilation results, on any device that has a web browser. But Compiler Explorer and tools like it require a server to do compilation, so they're hard to use offline. With WebAssembly, we can run the compiler client-side, in the browser, no server required.

First, I'll show how I ported the clang compiler and linker to WebAssembly. Since Clang 8 supports WebAssembly as a compilation target, we can even run the resulting executable sandboxed in the browser. Next, we'll dive into how Clang compiles C++ constructs into WebAssembly. Finally, we'll look at some of the new WebAssembly features in development.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.