What languages can be compiled to WebAssembly (Wasm)?

Jordan Stewart picture Jordan Stewart · Apr 21, 2017 · Viewed 35.8k times · Source

What languages can be compiled to WebAssembly (Wasm)?

I believe right now C, C++, and Rust (experimental) can be compiled to WebAssembly, with the llvm compiler backend, with languages like Java, Swift, and C# not currently being supported, but being possible candidates for future development.

I don't believe JavaScript can be compiled to Wasm. https://github.com/WebAssembly/design/issues/219

Answer

ColinE picture ColinE · Nov 25, 2017

WebAssembly support is ever evolving. Right now it is supported by the following languages:

There are commercial solutions also:

Regarding JavaScript, it is unlikely to gain support as WebAssembly is a statically typed assembly language.

There are also various more obscure / hobbyist languages that support WebAssembly. Further details can be found on the more exhaustive Awesome WebAssembly Languages list.