This is a WASI build of the Python 3.12 interpreter compiled by VMware Labs.
It is published as an NPM package @antonz/python-wasi:
https://unpkg.com/@antonz/python-wasi/dist/python.wasm
Using the Runno runtime:
import { WASI } from "https://unpkg.com/@antonz/runno/dist/runno.mjs";
const url = "https://unpkg.com/@antonz/python-wasi/dist/python.wasm";
const result = await WASI.start(fetch(url), {
args: ["python", "--version"],
stdout: (out) => console.log(out),
stderr: (err) => console.error(err),
});
console.log(`exit code = ${result.exitCode}`);
Result:
Python 3.12.0
exit code = 0
make prepare
make build
Copyright 2023 VMware Labs, Apache-2.0 license.
Python is copyrighted by Python Software Foundation, PSF License Agreement.