Introducing Componentize-Py: A Tool for Packaging Python Apps as Components
Talkat WasmCon 2023 · on Thursday, 2023-09-07· at 13:30· Grand Ballroom F, Hyatt Regency Bellevue, 900 Bellevue Way NE·
summary
Componentize-Py packages a Python app and its native extensions into a single WebAssembly Component that runs on WASI by bundling libpython311, libc, a pyo3-based runtime, and generated glue modules (main and init). It uses build-time code generation, pseudo-dynamic linking, and a component pre-initialization snapshot step so the interpreter is warmed at build time. Demo composes the component with wasmtime-py, runs numpy (custom Wasm build), enforces a 5s timeout and 20 MB memory limit, and shows both successful matrix runs and controlled timeout/memory errors.
AI-written summary · about
chapters (8)
- 0:00Componentize-Py introduction
- 1:51Agenda and prior art
- 3:58Native extensions challenges
- 7:52Composition models in WASM
- 13:09Choosing composition model
- 14:56How Componentize-Py works
- 25:36Demo: Sandboxing Python
- 33:27Q&A
related talks
32mFrom Cloud to Edge computing - Unleashing the power of WebAssembly at the edge
02h 47mA Pythonista's Introductory Guide to Web Assembly
38mKeynote – Peter Wang
24mPorting Python to WebAssembly
02h 36mPython Packaging Demystified
29mFrom Graveyard to Glory: Production Python in the Browser
45mHow to run Python in the browser
39mPyScript - Python in the Browser
