As stated on the official website:
TypeScript cannot be converted to WebAssembly, however AssemblyScript is a subset of TypeScript designed explicitly for WebAssembly.
Currently there's currently no Kubewarden SDK for AssemblyScript, we haven't created it bacause of lack of time. We will do that in the near future.
In the meantime, there seem to be some limitatations affecting AssemblyScript:
- There's no built-in way to Serialize and Deserilize classed to and from JSON. See this issue
- It seems there's no JSON path library for AssemblyScript
This GitHub repository contains a Kubewarden Policy written in AssemblyScript.
Worth of note: this repository has a series of GitHub Actions that automate the following tasks:
- Run unit tests and code linting on pull requests and after code is merged into the main branch
- Build the policy in
releasemode and push it to a OCI registry as an artifact