feat(wasm-ci): make rustup target install configurable via wasm-target-install input#169
Closed
BimaPangestu28 wants to merge 1 commit into
Closed
feat(wasm-ci): make rustup target install configurable via wasm-target-install input#169BimaPangestu28 wants to merge 1 commit into
BimaPangestu28 wants to merge 1 commit into
Conversation
…t-install input
The wasm job's rustup target install was hardcoded to wasm32-wasip2,
but the surrounding cargo args (wasm-check-args, wasm-build-args,
wasm-validate-glob) are all input-controllable. Callers that override
the target on those args still picked up the wasip2 toolchain — the
build then failed with E0463 ("can't find crate for `core`") because
the cargo --target requested a target the toolchain didn't install.
This adds a `wasm-target-install` input on both `pr-ci.yml` and the
parent `wasm-component-ci.yml`, with default `wasm32-wasip2` to keep
every existing caller working unchanged. Callers that build for
wasip1 (e.g., greentic-bundle-extensions, where bundle-standard-core
1.2.x pulls zip ^8 → typed-path ^0.12 which has unstable wasip2
stdlib usage) can now set:
wasm-target-install: wasm32-wasip1
wasm-check-args: --target wasm32-wasip1
wasm-build-args: --target wasm32-wasip1 --release
wasm-validate-glob: target/wasm32-wasip1/release/*.wasm
without forking the workflow.
Triggered by greentic-biz/greentic-bundle-extensions#26 (uptake of
greenticai/greentic-bundle PR #95 cards2pack-core routing fix).
5 tasks
Member
Author
|
Superseded by After #96 merges and stamps a new dev-publish version, No infrastructure change needed in this repo. Closing without merging. |
BimaPangestu28
added a commit
to greenticai/greentic-bundle
that referenced
this pull request
May 8, 2026
…ly requirement zip 7.2.0+ added a transitive `typed-path ^0.12` dependency. typed-path 0.12.x uses `feature(wasip2)` stdlib APIs that fail on stable Rust under the wasm32-wasip2 target. This blocked greentic-biz/greentic-bundle-extensions PR #26 from taking up the cards2pack-core empty-routing fix from PR #95. zip 7.1.0 is the most recent zip release before typed-path was introduced. bundle-standard-core only uses minimal zip API (ZipWriter::new, FileOptions, start_file, write_all, finish, ZipArchive::new) which is unchanged across 7.x. ZERO code change required, all 24 unit tests + 11 golden snapshot tests pass, full WASM build via cargo-component succeeds for both wasm32-wasip1 and wasm32-wasip2. After this lands, downstream consumers (bundle-standard.wasm) can re-pin to the next dev-publish stamp and inherit the fix transparently. The org-wide wasip2 default in centralized CI workflows stays — no migration churn, no fork maintenance. Supersedes greenticai/.github#169 (which proposed adding a wasm-target-install input as a workaround); that PR was closed in favor of this upstream pin fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The wasm job's rustup target install was hardcoded to
wasm32-wasip2, but the surrounding cargo args (wasm-check-args,wasm-build-args,wasm-validate-glob) are all input-controllable. Callers that override the target on those args still picked up the wasip2 toolchain — the build then failed withE0463: can't find crate for \core`because cargo \--target` requested a target the toolchain didn't install.This adds a
wasm-target-installinput on bothpr-ci.ymland the parent reusablewasm-component-ci.yml, defaulting towasm32-wasip2so every existing caller keeps working unchanged.Why now
greentic-biz/greentic-bundle-extensions#26is taking up thecards2pack-coreempty-routing fix fromgreenticai/greentic-bundle#95. After bumpingcards2pack-coreandbundle-standard-coreto1.2.0-dev.25512130996, the dep tree pulls in:typed-path 0.12.xusesfeature(wasip2)stdlib APIs that aren't stable onwasm32-wasip2under Rust stable:The same crate compiles cleanly on
wasm32-wasip1, andcargo-componentalready produces a Component Model artifact onwasip1that wasmtime loads via the runtime's Component Model wrapper.reference-extensions/bundle-standard/build.shhas always emitted towasm32-wasip1— the CI/build mismatch only surfaced after this dep upgrade. PR #26 needs to setwasm-target-install: wasm32-wasip1to align CI with the production build path.What changed
.github/workflows/pr-ci.yml:wasm-target-install(defaultwasm32-wasip2)targets: wasm32-wasip2(wasm job rustup install) withtargets: ${{ inputs.wasm-target-install }}.github/workflows/wasm-component-ci.yml:pr-ci.ymlcallBackward compatibility
Default value is
wasm32-wasip2, so every existing caller — and every other reusable-workflow consumer in the org — gets identical behavior. Only callers that explicitly opt in viawasm-target-install: ...change their target install.Test plan
python3 -c "import yaml; yaml.safe_load(...)")greentic-biz/greentic-bundle-extensions#26CI — wasm job should pass with the wasip1 input override