Skip to content

Conversation

@WhiteAbeLincoln
Copy link

@WhiteAbeLincoln WhiteAbeLincoln commented Dec 17, 2025

Similar to the build_zlib step, it downloads the wasi-sdk to the out directory. This download is performed if the path given by $WASI_SDK_PATH or /opt/wasi-sdk does not exist.

If $NO_DOWNLOAD_WASI_SDK is set, then we skip the automatic download even if the above path didn't exist when checked.

The download can be controlled using $WASI_SDK_URL to give the full download url, or $WASI_SDK_SOURCE (the github organization) and $WASI_SDK_VERSION (the major version number). $WASI_SDK_VERSION must be provided.

fixes #180

Copy link
Collaborator

@dicej dicej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this, @WhiteAbeLincoln! LGTM; just one suggestion inline below.

// how it's given in the github release build pipeline
let version = match env::var("WASI_SDK_VERSION").ok() {
Some(v) => v,
None => bail!("wasi-sdk not found and WASI_SDK_VERSION not set, cannot download"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, WASI-SDK 27 is the only version known to work with componentize-py, so we should probably default to that if WASI_SDK_VERSION is not set. I'm hoping we can support newer versions in the future, but even then we'll be able to pick a reasonable default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

download WASI-SDK automatically if neccessary during build

2 participants