wasm-rquickjs-cli 0.5.3

Tool for wrapping JavaScript modules as WebAssembly components using the QuickJS engine
1
2
3
4
5
6
7
8
9
10
export async function run(flag) {
  // Yield once to exercise the async path, then return a `result<u32, string>`.
  await Promise.resolve();
  if (flag) {
    // `ok` arm: return the bare success value.
    return 7;
  }
  // `err` arm: throw the error value.
  throw "nope";
}