Skip to content
0:00 / 0:00

#webassembly#c++#clang

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

CppCon

189K subscribers • 141 videos on Hallway • Conference channel

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Ben Smith
  • Linked in the descriptionCppCon/CppCon2019
  • May be out of date. Uploaded 7 years ago, in an area where tools change fast.

Intermediate. Assumes working knowledge.

51K views7 years ago1 recommendation

Web developmentSystems programmingWebAssemblyC++Compilers and interpreters

Ben Smith demonstrates how to compile and run C++ code, including Clang and LLVM, directly inside a web browser using WebAssembly.

CppCon.org Discussion & Comments: reddit.com/r/cpp/ Presentation Slides, PDFs, Source Code and other presenter materials are available at: github.com/CppCon/CppCon2019 — Applied WebAssembly: Compiling and Running C++ in Your Web Browser 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. — Ben Smith Ben Smith is a Software Engineer at Google, on the WebAssembly team. His primary work involves adding new features to V8, Chrome's JavaScript and WebAssembly engine. He's also the chair of the WebAssembly Community and Working Groups, where he helps move new features forward. From August to December 2019, he will be teaching introductory C++ classes at Morehouse University, as part of the Google-in-Residence program. — Videos Filmed & Edited by Bash Films: BashFilms.com Work at Hudson River Trading (HRT): tinyurl.com/safxfctf

Why it's here

1 person recommends this

What people say. Pointed to as a demonstration that complex tools like Clang can be compiled to run in WebAssembly.

u/banasrafin r/rust • Recommends

On “Compiling a Compiler to WASM”

The guy on this talk shows how he compiled clang to webassembly, so it's possibile - even compiling LLVM. link to this video