You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: When using the devcontainer for development, the following dependencies are already installed for you. To prevent speed up build times and prevent compatibility issues, a pre-compiled artifact of cpython for wasi is used rather than compiling from source. (https://github.com/brettcannon/cpython-wasi-build/releases/tag/v3.11.4)
First, perform a git submodule update to update the cpython submodule. (Unnecessary if using devcontainer)
git submodule update --init --recursive
Then, build CPython for wasm32-wasi. (Unnecessary if using devcontainer)
./build-python.sh
Then, build the spin-python-cli: (Unnecessary if using devcontainer)
make
Finally, build and run the example app:
cd examples/hello_world
$CARGO_TARGET_DIR/release/spin-python app -o app.wasm
spin up
*Note:spin-python and py2wasm are just different names for the same command. spin-python is used in the context of running the binary in a standalone context while py2wasm is used when the command is run via Spin. In the samples provided in the examples directory, the spin build command depends on the plugin py2wasm being installed. Therefore, to test the locally built spin-python binary, replace the build command in the spin.toml to invoke it using spin build.