Skip to content

Test panics and wasm32-wasip3 in CI, not wasip1 - #163132

Open
alexcrichton wants to merge 1 commit into
rust-lang:mainfrom
alexcrichton:wasm-unwind-tests
Open

alexcrichton wants to merge 1 commit into
rust-lang:mainfrom
alexcrichton:wasm-unwind-tests

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

This commit migrates the test-various job in CI from testing the wasm32-wasip1 target to testing the wasm32-wasip3 target. While doing so this additionally runs tests with -Cpanic=unwind instead of the historical -Cpanic=abort to expand the scope of tests slightly and run alloc tests, for example. The purpose of this change is to start migrating towards a wasm testing target which has a more fully-featured std, e.g. panics & threads, to run more tests in CI and make it less of a too-different target. This change was originally proposed at rust-lang/compiler-team#1039 which contains some more background details as well.

The major notable change in test coverage here is running tests with -Cpanic=unwind. WebAssembly targets by default still use -Cpanic=abort and this means that large swaths of the test suite do not execute because they require panicking/unwinding in one way or another. CI here is configuring wasm targets to specifically enable unwinding, but only for the testing build. To achieve this a new bootstrap.toml option is added which enables configuring the default panic_strategy for wasm targets -- an option only intended to be used in testing.

Most of this change is adjusting tests for this new testing infrastructure, some old Wasmtime-related TODOs are cleaned up as well with an updated build. Notably the only-wasm32-wasip1 directive for compiletest is removed and all preexisting tests are migrated to run for any wasm target. The run-make suite in particular is updated to handle when the wasm target outputs components and the various ABI details of the wasip3 target.

This change notably does not yet start to run std's test suite for the wasm32-wasip3 target. Too much of that test suite requires threads to be useful to run at this time, and as such running those tests is delayed until a later time when cooperative threading is enabled.

@rustbot

rustbot commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

This PR modifies bootstrap.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

The run-make-support library was changed

cc @jieyouxu

compiletest directives have been modified. Please add or update docs for the
new or modified directive in src/doc/rustc-dev-guide/.

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added A-CI Area: Our Github Actions CI A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 21, 2026
@rustbot

rustbot commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

r? @fee1-dead

rustbot has assigned @fee1-dead.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 18 candidates

@rust-log-analyzer

This comment has been minimized.

ENV NO_OVERFLOW_CHECKS=1

RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v44.0.1/wasmtime-v44.0.1-x86_64-linux.tar.xz | \
RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v48.0.2/wasmtime-v48.0.2-x86_64-linux.tar.xz | \

@Urgau Urgau Sep 21, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Small drive-by but should probably use our own ci-mirrors.

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sent as rust-lang/ci-mirrors#57 and I'll update here once that's merged

Comment thread library/test/src/lib.rs Outdated
@fee1-dead

Copy link
Copy Markdown
Member

@rustbot reroll

@rustbot rustbot assigned saethlin and unassigned fee1-dead Sep 22, 2026
alexcrichton added a commit to alexcrichton/ci-mirrors that referenced this pull request Sep 22, 2026
* Add wasmtime 48.0.2
* Add wasi-sdk-34

Requested on rust-lang/rust#163132
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

This commit migrates the `test-various` job in CI from testing the
`wasm32-wasip1` target to testing the `wasm32-wasip3` target. While
doing so this additionally runs tests with `-Cpanic=unwind` instead of
the historical `-Cpanic=abort` to expand the scope of tests slightly and
run `alloc` tests, for example. The purpose of this change is to start
migrating towards a wasm testing target which has a more fully-featured
`std`, e.g. panics & threads, to run more tests in CI and make it less
of a too-different target. This change was originally proposed at
rust-lang/compiler-team/1039 which contains some more background details
as well.

The major notable change in test coverage here is running tests with
`-Cpanic=unwind`. WebAssembly targets by default still use
`-Cpanic=abort` and this means that large swaths of the test suite do
not execute because they require panicking/unwinding in one way or
another. CI here is configuring wasm targets to specifically enable
unwinding, but only for the testing build. To achieve this a new
`bootstrap.toml` option is added which enables configuring the default
`panic_strategy` for wasm targets -- an option only intended to be used
in testing.

Most of this change is adjusting tests for this new testing
infrastructure, some old Wasmtime-related TODOs are cleaned up as well
with an updated build. Notably the `only-wasm32-wasip1` directive for
compiletest is removed and all preexisting tests are migrated to run for
any wasm target. The `run-make` suite in particular is updated to handle
when the wasm target outputs components and the various ABI details of
the wasip3 target.

This change notably does not yet start to run `std`'s test suite for the
`wasm32-wasip3` target. Too much of that test suite requires threads to
be useful to run at this time, and as such running those tests is
delayed until a later time when cooperative threading is enabled.
@alexcrichton

Copy link
Copy Markdown
Member Author

@bors try jobs=test-various

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 22, 2026
Test panics and wasm32-wasip3 in CI, not wasip1


try-job: test-various
@rust-bors

rust-bors Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 6413ad1 (6413ad11fa8d968d596fed762a21dce36d672759)
Base parent: 6bb1652 (6bb1652a020e80cef79332741d89e996d71933c9)

@rust-lang rust-lang deleted a comment Sep 25, 2026

This branch has not been deployed

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

Labels

A-CI Area: Our Github Actions CI A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants