Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ runner = 'wasm-bindgen-test-runner'
runner = 'wasmtime'
[target.wasm32-wasip2]
runner = 'wasmtime'
[target.wasm32-wasip3]
runner = 'wasmtime'

# Just run on node by default (that's where emscripten is tested)
[target.'cfg(target_os = "emscripten")']
runner = 'node'

[resolver]
incompatible-rust-versions = "allow"
Copy link
Copy Markdown
Member Author

@newpavlov newpavlov Jan 26, 2026

Choose a reason for hiding this comment

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

wasip3 v0.4 requires Rust 1.87. Technically, we should bump rust-version for getrandom as well, but I guess it's fine to skip it in this case.

Unfortunately, this setting may complicate MSRV testing since we could pull dependencies into Cargo.lock which require a higher Rust version. I think the right way to handle this would be to execute cargo update in each MSRV job.

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.

Is it not sufficient to use cargo update --ignore-rust-version only in the relevant tests?

Copy link
Copy Markdown
Member Author

@newpavlov newpavlov Jan 26, 2026

Choose a reason for hiding this comment

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

Yes, it could work as well. But I think we should commit latest dependency versions into Cargo.lock and test with them by default, not MSRV-compatible ones. Plus, we have more non-MSRV jobs.

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.

See

- name: Generate MSRV-compatible Cargo.lock
env:
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: "fallback"
run: cargo update

4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@ jobs:
wget -O - $URL | tar -xJ --strip-components=1 -C ~/.cargo/bin
wasmtime --version
- uses: Swatinem/rust-cache@v2
- name: Generate MSRV-compatible Cargo.lock
env:
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: "fallback"
run: cargo update
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IMO it would be better to restrict this to -p wasip2 -p wasip3 or whatever, instead of updating all the dependencies.

- run: cargo test --target wasm32-wasip2

# TODO: enable after pre-built std will be provided by Rust
Expand Down
Loading