Home

Awesome

Clang/LLD in WebAssembly

This is the demo for my CppCon 2019 talk! You can view the talk on youtube

Thing should work, but it's still very much alpha demoware. Go to https://binji.github.io/wasm-clang to see it in action.

Most of the JavaScript code can be found here. If you're interested in the implementation of the in-memory filesystem, take a look at https://github.com/binji/llvm-project/tree/master/binji.

Some notes on how I built this, sorry that they are relatively sparse: https://gist.github.com/binji/b7541f9740c21d7c6dac95cbc9ea6fca

Directory structure

Shared utilities

Assemble 6502 code

Compile C++ code to x86/wasm assembly

Compile C++ code in d8 (v8's console shell)

Compile and run C++ code