0.12.1
Customizable WASI path
By default, Codapi loads WASI binaries from the UNKPG CDN. For example:
https://unpkg.com/@antonz/[email protected]/dist/lua.wasm
Now you can customize the base path (the part of the URL before the filename) by passing it to the wasi.js
script. For example, here is how to load lua.wasm
from /assets/js
(so the full URL would be /assets/js/lua.wasm
):
<script src="wasi.js?path=/assets/js"></script>
Pass the path
parameter without the trailing slash.
The filename part cannot be changed, so if you host the .wasm
files yourself, do not change their names and put them all in the same folder (accessible by the URL you pass as the path
parameter).
See the default settings in boxes.json
.