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.
For the time being, we use temporary forks of wasi-sdk
and wasi-libc
which
enable support for wasi-sockets
. Once that support is upstreamed, we'll
switch.
- Tools needed to build CPython (Make, Clang, etc.)
- Rust stable 1.71 or later and nightly 2023-07-27 or later, including the
wasm32-wasi
andwasm32-unknown-unknown
targets- Note that we currently use the
-Z build-std
Cargo option to build thecomponentize-py
runtime with position-independent code (which is not the default forwasm32-wasi
) and this requires using a recent nightly build of Rust.
- Note that we currently use the
For Rust, something like this should work once you have rustup
:
rustup update
rustup install nightly
rustup component add rust-src --toolchain nightly
rustup target add wasm32-wasi wasm32-unknown-unknown
First, make sure you've got all the submodules cloned.
git submodule update --init --recursive
Next, install WASI SDK to /opt/wasi-sdk
(alternatively, you can specify a
different location and reference it later using the WASI_SDK_PATH
environment
variable). Replace linux
with macos
or mingw
(Windows) below depending on
your OS.
curl -LO https://github.com/dicej/wasi-sdk/releases/download/wasi-sockets-alpha-5/wasi-sdk-20.46gf3a1f8991535-linux.tar.gz
tar xf wasi-sdk-20.46gf3a1f8991535-linux.tar.gz
sudo mv wasi-sdk-20.46gf3a1f8991535 /opt/wasi-sdk
export WASI_SDK_PATH=/opt/wasi-sdk
Finally, build and run componentize-py
.
cargo run --release -- --help