This guide tracks support for compiling a language to WebAssembly. It is organized into three sections: Support for the top 20 languages, WebAssembly-specific languages, and other notable languages. We track whether the language can be compiled to run in the browser, in other non-browser environments, and in a WASI environment. In the detail page for each language, we do our best to not only state the current level of support, but also point to an array of useful resources.
WebAssembly Support in Top 20 Languages
This reports on the top 20 languages from RedMonk’s ranking. Some languages, like CSS, PowerShell, and “Shell”, don’t really have a meaningful expression in Wasm. However, we have left them here for completeness.
Language | Browser | Other | WASI | Notes |
---|---|---|---|---|
JavaScript | ⏳ | ⏳ | ⏳ | |
Python | ⏳ | ✅ | ✅ | |
Java | ✅ | ✅ | ❌ | |
PHP | ✅ | ✅ | ✅ | |
CSS | N/A | N/A | N/A | |
C# and .NET | ✅ | ✅ | ✅ | Covers .NET as well |
C++ | ✅ | ✅ | ✅ | |
TypeScript | ❌ | ⏳ | ❌ | Consider AssemblyScript |
Ruby | ✅ | ✅ | ✅ | |
C | ✅ | ✅ | ✅ | |
Swift | ✅ | ✅ | ✅ | |
R | ✅ | ❌ | ❌ | |
Objective-C | ❌ | ? | ❌ | |
Shell | N/A | N/A | N/A | Not a specific language |
Scala (native) | ❌ | ⏳ | ❌ | See Java |
Go | ✅ | ✅ | ✅ | Via Go and TinyGo |
PowerShell | ❌ | ❌ | ❌ | This is unlikely to change. |
Kotlin | ✅ | ⏳ | ⏳ | |
Rust | ✅ | ✅ | ✅ | |
Dart | ⏳ | ❌ | ❌ |
WebAssembly Specific Languages
Language | Browser | CLI | WASI | Notes |
---|---|---|---|---|
AssemblyScript | ✅ | ✅ | ✅ | |
Grain | ✅ | ✅ | ✅ | |
Motoko | ✅ | ✅ | ✅ |
Other Notable Languages
These languages enjoy broad use (though perhaps not in the top 20) and have at least some degree of WebAssembly Support
Language | Browser | CLI | WASI | Notes |
---|---|---|---|---|
COBOL | ⏳ | ✅ | ⏳ | |
Erlang (BEAM) | ⏳ | ⏳ | ⏳ | |
Haskell | ✅ | ✅ | ✅ | |
Lisp | ⏳ | ⏳ | ⏳ | |
Lua | ✅ | ❌ | ❌ | |
Perl | ✅ | ❌ | ❌ | |
Zig | ✅ | ✅ | ✅ |
How To Read These Charts
For each environment, we use the following icons to indicate a level of support:
- ✅ Usable
- ⏳ In progress
- ❌ Not implemented
- N/A Not applicable
The Fermyon Platform requires WASI support. Any language that has a ✅ for WASI should be supported on the Fermyon Platform.
If you are interested in contributing to this guide, head on over to the GitHub repo.
We are often asked which languages are best supported for production-grade WebAssembly. We suggest C/C++, Rust, and AssemblyScript.
Updates and Additions
The source for the WebAssembly Language Guide is located in a public GitHub project. If you find errors, want to make additions, or have further corrections for us, the issue queue is a great place to discuss.
If you’re more interested in chatting about things, check out our Discord server or hit us up a @FermyonTech on Twitter
Relevant Standards
Throughout our pages, we talk about technologies like WASI, Wagi, and Spin. Many of these are backed by formal documents. See the Standards page for links to the relevant texts along with helpful resources.