@antonz/python-wasi

3.12.0 • Public • Published

Python WASI build

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

Usage

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

Building from source

make prepare
make build

License

Copyright 2023 VMware Labs, Apache-2.0 license.

Python is copyrighted by Python Software Foundation, PSF License Agreement.

Readme

Keywords

none

Package Sidebar

Install

npm i @antonz/python-wasi

Weekly Downloads

36

Version

3.12.0

License

Apache-2.0

Unpacked Size

26.3 MB

Total Files

5

Last publish

Collaborators

  • antonz