componentize-qjs-cli 0.1.0

CLI for converting JavaScript to WebAssembly components using QuickJS
Documentation
1
2
3
4
5
6
7
8
9
// Test calling WASI imports
function getRandomU64() {
    // Access the WASI random interface
    const random = globalThis["wasi:random/random@0.2.6"] || globalThis["wasi:random/random"];
    if (!random) {
        throw new Error("wasi:random/random not found");
    }
    return random.getRandomU64();
}