Rust is the most mature programming language that can generate WebAssembly modules. WebAssembly is a first-class citizen in the Rust world so many of the tools and crates from the Rust ecosystem work out of the box.
This documentation shows how to use these projects to write Kubewarden policies using Rust. It doesn't cover the details of Kubewarden's Rust SDK. The details are in the crate documentation.
Getting the Rust dependencies
Once you have installed
rustup add the WebAssembly System Interface (WASI) target:
rustup target add wasm32-wasi
cargo-generate you need to add the Xcode tool set.
If it isn't installed through Xcode the following command gives you the dependencies needed: