AAssemblyscript is pretty much typescript, with some builtin-types for WASM. It's a great choice, if you are already familiar with javascirpt or typescript.
- See cart structure for more info about how callbacks work.
- See API for more info about the null0 API.
- See examples
- You can use WASI too, so all regular C stdlib-file stuff should work.
- Check out the Assemblyscript template project
- You will need Assemblyscript installed.
- The definitive header is here, so use that to ensure yours is up-to-date
A simple cart might look like this:
And then you can compile to a cart with:
mkdir -p cart
curl https://raw.githubusercontent.com/notnullgames/null0/refs/heads/main/carts/as/null0.ts > null0.ts
asc main.ts --optimize --target release -o "cart/main.wasm" --runtime stub
cd cart
zip -rq ../mygame.null0 .
See build.sh for an example of how I build for this example-site.