Skip to content

Add a wasi package command - #154510

Merged
brettcannon merged 50 commits into
python:mainfrom
brettcannon:wasi-package
Aug 5, 2026
Merged

Add a wasi package command#154510
brettcannon merged 50 commits into
python:mainfrom
brettcannon:wasi-package

Conversation

@brettcannon

Copy link
Copy Markdown
Member

This introduces a wasi package command to Platforms/WASI/ that creates a .tar.xz file as a WASI distribution. This did entail a refactoring to share code between this and the build command. I tried to keep start-up costs down so --help was snappy.

This is very much an MVP for the command itself and the resulting .tar.xz file. Future plans for the command include:

  • Getting tests that fail from the distribution passing (including the warning in the REPL about not running from --prefix)
  • A --build flag so that wasi package can go from checkout to .tar.xz in one command (including using flags that should be used when building for a distribution)
  • A container file that uses the WASI dev container so the packaging requires no toolchain installation beyond Docker/podman

There should probably also be some testing/CI of the distribution at some point.

@brettcannon brettcannon self-assigned this Jul 22, 2026
@brettcannon
brettcannon requested a review from emmatyping as a code owner July 22, 2026 22:33
@brettcannon brettcannon added the build The build process and cross-build label Jul 22, 2026
@brettcannon brettcannon reopened this Jul 22, 2026
@vstinner

Copy link
Copy Markdown
Member

Do you plan documenting this new command in Platforms/WASI/README.md or https://devguide.python.org/getting-started/setup-building/#wasi? It would be nice to have a short description of the new package command, of the tarball contents and how it's supposed to be used.

@brettcannon

Copy link
Copy Markdown
Member Author

Do you plan documenting this new command in Platforms/WASI/README.md

I had not thought about it, but I can plan to do that in another PR to also cover the build command.

@brettcannon

Copy link
Copy Markdown
Member Author

!buildbot wasi

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @brettcannon for commit d14bb0d 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F154510%2Fmerge

The command will test the builders whose names match following regular expression: wasi

The builders matched are:

  • wasm32-wasi PR

@brettcannon
brettcannon enabled auto-merge (squash) August 4, 2026 19:57
@brettcannon
brettcannon merged commit e12ee02 into python:main Aug 5, 2026
47 checks passed
@brettcannon
brettcannon deleted the wasi-package branch August 5, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build The build process and cross-build OS-wasi skip issue skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants