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.
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.
We are often asked which languages are best supported for production-grade WebAssembly. We suggest C/C++, Rust, and AssemblyScript.
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++ | β | β | β | |
C# and .NET | β | β | β | Covers .NET as well |
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 | β | β | β |
Updates and Additions
If you find an error or are interested in an addition, let us know.