Please file issues (bug reports, questions, feature requests, etc.) on the GitHub repository. That's also the place for pull requests. If you're planning to make a big change, please file an issue first to avoid duplicate effort.
Outside of GitHub, most development discussion happens at the SIG Guest Languages Python subgroup meetings and the Guest Languages Zulip channel.
- Tools needed to build CPython (Make, Clang, etc.)
- Rust stable 1.94 or later, including the
wasm32-wasip2target
For Rust, something like this should work once you have rustup:
rustup update
rustup target add wasm32-wasip2First, make sure you've got all the submodules cloned.
git submodule update --init --recursiveNext, install WASI-SDK 33 to /opt/wasi-sdk (alternatively, you can specify a
different location and reference it later using the WASI_SDK_PATH environment
variable). Replace arm64-linux with x86_64-linux, arm64-macos,
x86_64-macos, arm64-windows, or x86_64-windows below depending on your
architecure and OS, if necessary.
curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-33/wasi-sdk-33.0-arm64-linux.tar.gz
tar xf wasi-sdk-33.0-arm64-linux.tar.gz
sudo mv wasi-sdk-33.0-arm64-linux /opt/wasi-sdk
export WASI_SDK_PATH=/opt/wasi-sdkFinally, build and run componentize-py.
cargo run --release -- --helpThe release process currently requires several manual steps, unfortunately. Automating this as part of CI would be great!
In the following, we'll pretend we're bumping the version from 0.22.1 to 0.23.0. Remember to replace those numbers with the ones applicable to your release.
The first step is to update the version number in Cargo.toml, pyproject.toml, and the examples. We can use this bash one-liner:
for x in $(find examples/ -name README.md) Cargo.toml pyproject.toml; do sed -i 's/0\.22\.1/0.23.0/' $x; doneNote that that's a bit sketchy since it will match any 0.22.1 string, meaning
if we have a dependency with the same version number, it will get bumped also.
Be sure to run git diff and verify everything looks right before proceeding,
and make manual edits if necessary.
Next, commit your changes and open a PR. Once that PR is merged, tag and sign
the commit using git tag -s v0.23.0 and push it using e.g. git push v0.23.0.
Merging the PR to main will also kick off a release build, updating the canary
release. When that finishes, go to the canary release
page
and download the componentize_py-0.23.0-*.whl and
componentize_py-0.23.0.tar.gz file, move them into a newly-created dist
directory, and run the following:
python3 -m venv venv
source venv/bin/activate
pip install twine --upgrade
twine upload dist/*You'll be prompted for an auth token. If you don't have one and think you should, please open an issue on this repository.
The above will publish Python wheels to pypi.org. To publish to crates.io, you'll need to do the following:
cargo login
bash stage.sh && (cd target/staged && cargo publish)Again, you'll need an auth token; open an issue if you need one.