Skip to main content

Quickstart

Install

Homebrew is the fastest path on macOS and Linux:

brew install tegmentum/tap/pylon

No brew? The install script has the same shape as rustup / uv:

curl -fsSL https://pylon.dev/install.sh | sh

Other channels — tarball, pip wheel (pip install pylon), and Docker image (ghcr.io/tegmentum/pylon) — all ship the same pylon.wasm, launcher, and cap set. See distribution channels for per-channel invariants and layout.

Run

Once pylon is on your PATH:

pylon -c "print(1 + 1)"
# => 2

echo 'import duckdb; print(duckdb.sql("SELECT 42").fetchone())' | pylon
# => (42,)

Same shape as CPython — pass a script, -c, or read from stdin. The underlying runtime is a wasm32-wasip2 component executed by wasmtime (bundled with the launcher).

Try MicroPython

Pylon ships a MicroPython 1.24 build alongside CPython. Same cap layer, smaller cold-start:

pylon --mp -c "print('hello from micropython')"

Building from source

make all # fetch SDK + CPython, cross-build python.wasm
make python-composed # wac plug caps into build/pylon.wasm
make run ARGS='-c "print(1+1)"'
make test # WASI CLI smoke tests

make all runs two phases:

  1. fetch-deps — downloads the WASI SDK, clones CPython at the version named by the active profile, applies per-version patches under patches/<py-minor>/.
  2. build — runs CPython's own Tools/wasm/wasi build to produce deps/<profile-source-dir>/cross-build/wasm32-wasip2/python.wasm.

Multi-version, multi-variant builds are driven by profiles/*.toml. Adding a new Python version or variant means writing a new profile, not editing the Makefile.

make python-composed PROFILE=3.13-current # CPython 3.13.9 build
make show-profile PROFILE=3.13-current # dump resolved variables

For a step-by-step fresh-machine bootstrap with reproducibility digests, see Build from scratch.

Web demo

Pylon runs in the browser via jco-transpilation and @tegmentum/wasi-polyfill:

make web-dev # build stdlib + component, launch Vite dev server
make web-build # production bundle in web/dist

web-dev runs three prep steps (web-stdlib, web-transpile, web-deps) then Vite. See web/src/python-runner.ts for the runtime wiring — the polyfill fills in the WASI Preview 2 host surface in JS.

Where to go next

  • Architecture overview — what a cap is, how compose works, what composectl does.
  • Add a cap — the walkthrough for wiring a new capability end-to-end.