Update Rust toolchain to 1.93.1 and add wasm32-linera-chain target#5646
Update Rust toolchain to 1.93.1 and add wasm32-linera-chain target#5646deuszx wants to merge 13 commits intotestnet_conwayfrom
Conversation
|
We really should work on |
44c1fe0 to
2b701d6
Compare
Bump stable toolchain to 1.93.1 and nightly to nightly-2026-03-01. Introduce a custom wasm32-linera-chain target that disables bulk-memory and nontrapping-fptoint opcodes (0xFC prefix) for on-chain Wasm applications. Update wasmer/wasm-instrument to git forks with probestack and bulk-memory support, unpin ruzstd, and remove bridge-e2e MSRV workarounds that are no longer needed. Add the target spec and cargo config to the project template so that `linera project new` produces projects ready to build for the chain target. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The 4 changes: 1. linera-witty-macros/src/wit_interface.rs:205 — **return_type = actual_output (avoid needless Box allocation) 2. linera-witty/src/runtime/wasmer/mod.rs:126 — StoreMut<'_> (explicit elided lifetime) 3. linera-witty/src/runtime/wasmtime/mod.rs:44 — StoreContext<'_, UserData> 4. linera-witty/src/runtime/wasmtime/mod.rs:50 — StoreContextMut<'_, UserData>
3a49676 to
a34257b
Compare
| - name: Install nightly toolchain for wasm builds | ||
| run: | | ||
| rustup toolchain install $(sed -n 's/^channel = "\(.*\)"/\1/p' toolchains/nightly/rust-toolchain.toml) --component rust-src |
There was a problem hiding this comment.
I don't love parsing TOML with sed 😅 We do this generally by linking the toolchain to rust-toolchain.toml.
I wonder if it's time to always use a nightly toolchain. We can still be compatible with stable Rust by forbidding #![feature] flags in the core code — @ma2bd for interest.
| unset RUSTUP_TOOLCHAIN RUSTFLAGS | ||
| cd examples | ||
| cargo build --locked --release --target wasm32-unknown-unknown | ||
| cargo build --locked --release --target wasm32-linera-chain |
There was a problem hiding this comment.
We can (and should) put this in .cargo/config.toml so we don't need to specify it here.
There was a problem hiding this comment.
IIRC, the issue was that .cargo/config.toml was being ignored in the CI b/c of some ENV overwrites.
There was a problem hiding this comment.
I think its RUSTFLAGS specifically are a bit fiddly. But the target should be fine.
Motivation
Right now we're stuck on a quite old 1.88 toolchain. This is increasing becoming a problem when certain dependencies have version conflicts that are hard to resolve or only possible to resolve on newer toolchains.
Proposal
wasm32-linera-chaintarget that disables bulk-memory and nontrapping-fptoint opcodes (0xFC prefix) for on-chain Wasm applications.wasmer/wasm-instrumentto git forks with probestack and bulk-memory supportlinera project newproduces projects ready to build for the chain target.Test Plan
CI
Release Plan
Links