Language Support for WebAssembly Components
wasmCloud runs standard WebAssembly components targeting WASI P2. Any language toolchain that can produce a Wasm component with WASI P2 support can build components that run on wasmCloud.
This page provides a reference for various languages' support for compiling WebAssembly components, as well as wasmCloud ecosystem support for building and running components developed in a given language.
Component Support
This chart summarizes the current state of language support for WebAssembly components, from languages with built-in WASI P2 targets to toolchains that are still in progress.
| Language | Toolchain | Status | WASI version |
|---|---|---|---|
| Rust | cargo + wasm32-wasip2 target | Stable | P2 |
| Go | TinyGo, or Go + componentize-go | Stable | P2 (P3 via componentize-go) |
| TypeScript / JavaScript | jco + componentize-js | Stable | P2 |
| C# / .NET | componentize-dotnet | Stable | P2 |
| Python | componentize-py | Stable | P2 |
| C | wasi-sdk + wit-bindgen-c | Stable | P2 |
| C++ | wit-bindgen-cpp | Experimental | P2 |
| Ruby | ruby.wasm | In progress | P2 (partial) |
| Kotlin | Kotlin/Wasm (native) | Planned | — |
| Swift | SwiftWasm | Roadmap accepted | — |
| Java | GraalWasm | Planned | — |
Tier 1: Well-supported toolchains
These languages are supported by wasmCloud component project templates, wash dev integration, and documentation in the Developer Guide.
Rust
Rust has first-class WebAssembly support via the wasm32-wasip2 compiler target, which ships with the standard Rust toolchain.
- Toolchain:
cargowith targetwasm32-wasip2(install viarustup target add wasm32-wasip2) - Bindings: The
wstdcrate provides an async Rust standard library for Wasm components and WASI 0.2, hosted by the Bytecode Alliance. You can also usewit-bindgendirectly for lower-level control. - Get started: Developer Guide | Rust Language Guide
JavaScript (TypeScript)
TypeScript components are built using the jco toolchain (part of the Bytecode Alliance), which compiles JS/TS to Wasm components via componentize-js.
- Toolchain:
jco+componentize-js - Bindings:
jcogenerates TypeScript types from WIT files automatically - Get started: Developer Guide | TypeScript Language Guide
Go
Go components can be built with either of two toolchains: TinyGo, which targets wasip2 directly and produces small binaries from a large subset of Go, or the standard Go compiler via componentize-go, which gives you the full Go standard library and runtime at the cost of larger artifacts and newer, pre-1.0 tooling. The wasmCloud Go SDK, examples, and tutorials use TinyGo today.
- Toolchain: TinyGo with
-target wasip2, or Go 1.25.5+ withcomponentize-go - Bindings:
wit-bindgen-gogenerates Go bindings from WIT files for TinyGo, and thego.wasmcloud.dev/componentpackage provides idiomatic Go helpers (e.g.wasihttp.HandleFuncfornet/http-style request handling). Withcomponentize-go, bindings come fromcomponentize-go bindingsand thego.bytecodealliance.org/pkgsupport library. washsupport:wash new,wash dev,wash build— requires a.wash/config.yamlconfiguration file with abuild.commandfor whichever toolchain you use- Get started: Developer Guide | Go Language Guide
The standard Go compiler has no wasip2 target yet, so componentize-go builds a wasip1 module and adapts it into a component, while TinyGo emits a component directly. See Choosing a toolchain in the Go Language Guide for the tradeoffs.
Tier 2: Stable toolchains
These languages have stable Component Model toolchains that can produce components compatible with wasmCloud. You can build components manually and run them with wash, but there are no wash project templates or wash dev integrations yet.
C# / .NET
componentize-dotnet is a Bytecode Alliance project that compiles .NET applications to Wasm components using NativeAOT.
- Toolchain:
componentize-dotnetNuGet package - Status: Stable; actively maintained by the Bytecode Alliance
- Build: Components are built with
dotnet buildand thecomponentize-dotnetMSBuild integration - Repository: bytecodealliance/componentize-dotnet
Python
componentize-py is a Bytecode Alliance project that compiles Python applications to Wasm components.
- Toolchain:
componentize-pyCLI - Status: Stable; actively maintained by the Bytecode Alliance
- Build:
componentize-py componentize --wit-path wit --world <world-name> -o output.wasm app.py - Repository: bytecodealliance/componentize-py
Tier 3: In progress or planned
These toolchains are actively working toward Component Model support. Components built with these tools may not yet be fully compatible with wasmCloud.
| Language | Toolchain | Status | More information |
|---|---|---|---|
| C | wasi-sdk + wit-bindgen-c | WASI P2 + Component Model support complete | wasi-sdk releases |
| C++ | wit-bindgen-cpp | Experimental | wit-bindgen-cpp repository |
| Ruby | ruby.wasm | Component Model support in progress | ruby.wasm repository |
| Kotlin | Kotlin/Wasm | Native Wasm Component Model support planned by JetBrains | JetBrains tracking issue |
| Swift | SwiftWasm | Component Model roadmap accepted | WebAssembly vision |
| Java | GraalWasm | WASI support planned | GraalVM documentation |
Binding generators
Most languages use wit-bindgen (or a language-specific tool built on the same foundation) to generate typed bindings from WIT interface definitions. wit-bindgen currently supports:
- Rust (
wit-bindgen-rust) - Go (
wit-bindgen-go) - C (
wit-bindgen-c) - C# (via
componentize-dotnet) - Java (
wit-bindgen-java, early stage)
For TypeScript/JavaScript, jco handles binding generation as part of its build pipeline.
Further reading
- WebAssembly Component Model specification — Official Component Model repository and specification
- Component Model documentation — Specification and guides for the Wasm Component Model
- WASI.dev — WebAssembly System Interface specifications
- Developer Guide —
washtutorial for creating, building, and publishing components - Useful WebAssembly Tools — Additional tooling for Wasm development