A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Update MSRV to 1.97.0 (#14466)
Alex Crichton57db6313af1f
diff --git a/.github/actions/install-rust/action.yml b/.github/actions/install-rust/action.ymlindex 0284c0a7b8..1d500bbcfe 100644--- a/.github/actions/install-rust/action.yml+++ b/.github/actions/install-rust/action.yml@@ -32,7 +32,7 @@ runs:elif [ "${{ inputs.toolchain }}" = "msrv" ]; thenecho "version=1.$msrv.0" >> "$GITHUB_OUTPUT"elif [ "${{ inputs.toolchain }}" = "wasmtime-ci-pinned-nightly" ]; then- echo "version=nightly-2026-08-24" >> "$GITHUB_OUTPUT"+ echo "version=nightly-2026-10-01" >> "$GITHUB_OUTPUT"elif [ "${{ inputs.toolchain }}" = "wasmtime-ci-oss-fuzz-pin" ]; then# Do not change this number unless OSS-Fuzz has updated. If you update# this version and do not update OSS-Fuzz then you will break ourdiff --git a/.github/workflows/main.yml b/.github/workflows/main.ymlindex a834731595..42e5ed3b02 100644--- a/.github/workflows/main.yml+++ b/.github/workflows/main.yml@@ -1294,6 +1294,11 @@ jobs:with:toolchain: wasmtime-ci-pinned-nightly- run: rustup component add rust-src miri+ # There's a seemingly bug on nightly right now where miri's assembly of+ # the sysroot generates a Cargo warning about an unused `sysroot`+ # dependency. Turn off deny-warnings for now entirely and rely on other+ # jobs in CI to catch warnings.+ - run: echo CARGO_BUILD_WARNINGS=allow >> "$GITHUB_ENV"- uses: ./.github/actions/cargo-installwith:crate: cargo-nextestdiff --git a/Cargo.toml b/Cargo.tomlindex e91000cae7..70a9a2f5e8 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -226,7 +226,7 @@ authors = ["The Wasmtime Project Developers"]edition = "2024"# Wasmtime's current policy is that this number can be no larger than the# current stable release of Rust minus 2.-rust-version = "1.96.0"+rust-version = "1.97.0"[workspace.lints.rust]# Turn on some lints which are otherwise allow-by-default in rustc.@@ -604,7 +604,7 @@ gc-null = ["gc", "wasmtime/gc-null", "wasmtime-cli-flags/gc-null"]gc-copying = ["gc", "wasmtime/gc-copying", "wasmtime-cli-flags/gc-copying"]pulley = ["wasmtime-cli-flags/pulley"]stack-switching = ["wasmtime/stack-switching", "wasmtime-cli-flags/stack-switching"]-debug = ["wasmtime-cli-flags/debug", "wasmtime/debug", "component-model"]+debug = ["wasmtime-cli-flags/debug", "wasmtime/debug", "component-model", "dep:wasmtime-debugger"]# CLI subcommands for the `wasmtime` executable. See `wasmtime $cmd --help`# for more information on each subcommand.@@ -629,7 +629,6 @@ run = ["dep:tokio","wasmtime-cli-flags/async","wasmtime-wasi-http?/p2",- "dep:wasmtime-debugger",]completion = ["dep:clap_complete"]objdump = [diff --git a/crates/fiber/Cargo.toml b/crates/fiber/Cargo.tomlindex fdc826892e..d40c0fbcff 100644--- a/crates/fiber/Cargo.toml+++ b/crates/fiber/Cargo.toml@@ -13,11 +13,13 @@ workspace = true[dependencies]wasmtime-environ = { workspace = true }-wasmtime-versioned-export-macros = { workspace = true }[target.'cfg(unix)'.dependencies]-rustix = { workspace = true, features = ["mm"] }-libc = { workspace = true }+rustix = { workspace = true, features = ["mm"], optional = true }+libc = { workspace = true, optional = true }++[target.'cfg(windows)'.dependencies]+wasmtime-versioned-export-macros = { workspace = true, optional = true }[target.'cfg(windows)'.dependencies.windows-sys]workspace = true@@ -37,7 +39,7 @@ backtrace = "0.3.68"# Assume presence of the standard library. Allows propagating# panic-unwinds across fiber invocations.-std = []+std = ['dep:rustix', 'dep:libc', 'dep:wasmtime-versioned-export-macros']# Use embedder-provided stack-switching routines on unsupported architectures.# See `src/stackswitch/custom.rs` for the C ABI the embedder must implement.diff --git a/crates/jit-icache-coherence/Cargo.toml b/crates/jit-icache-coherence/Cargo.tomlindex d96b7ed74a..0e90f27d36 100644--- a/crates/jit-icache-coherence/Cargo.toml+++ b/crates/jit-icache-coherence/Cargo.toml@@ -23,7 +23,10 @@ features = ["Win32_System_Diagnostics_Debug",]-[target.'cfg(any(target_os = "linux", target_vendor = "apple", target_os = "freebsd", target_os = "android"))'.dependencies]+[target.'cfg(all(not(miri), target_arch = "aarch64", any(target_os = "linux", target_os = "android")))'.dependencies]+libc = { workspace = true }++[target.'cfg(all(not(miri), target_arch = "riscv64", target_os = "linux"))'.dependencies]libc = { workspace = true }[features]diff --git a/crates/jit-icache-coherence/src/lib.rs b/crates/jit-icache-coherence/src/lib.rsindex f547b2bc45..8843c65039 100644--- a/crates/jit-icache-coherence/src/lib.rs+++ b/crates/jit-icache-coherence/src/lib.rs@@ -73,6 +73,7 @@//! [ARM Community - Caches and Self-Modifying Code]: https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/caches-and-self-modifying-codeuse std::ffi::c_void;+use wasmtime_core::error::Result;cfg_select! {target_os = "windows" => {@@ -97,7 +98,7 @@ cfg_select! {/// after all calls to [clear_cache].////// If the architecture does not require a pipeline flush, this function does nothing.-pub fn pipeline_flush_mt() -> imp::Result<()> {+pub fn pipeline_flush_mt() -> Result<()> {imp::pipeline_flush_mt()}@@ -109,6 +110,6 @@ pub fn pipeline_flush_mt() -> imp::Result<()> {////// It is necessary to call [pipeline_flush_mt] after this function if you are running in a multi-threaded/// environment.-pub unsafe fn clear_cache(ptr: *const c_void, len: usize) -> imp::Result<()> {+pub unsafe fn clear_cache(ptr: *const c_void, len: usize) -> Result<()> {imp::clear_cache(ptr, len)}diff --git a/crates/jit-icache-coherence/src/libc.rs b/crates/jit-icache-coherence/src/libc.rsindex dcc6e62684..fa5b2c6b22 100644--- a/crates/jit-icache-coherence/src/libc.rs+++ b/crates/jit-icache-coherence/src/libc.rs@@ -1,10 +1,5 @@use std::ffi::c_void;--#[cfg(any(target_os = "linux", target_os = "android"))]-pub use std::io::Result;--#[cfg(not(any(target_os = "linux", target_os = "android")))]-pub use wasmtime_core::error::Result;+use wasmtime_core::error::Result;#[cfg(all(target_arch = "aarch64",@@ -14,7 +9,7 @@ mod details {use super::*;use libc::{EINVAL, EPERM, syscall};- use std::io::Error;+ use std::io::{self, Error};const MEMBARRIER_CMD_GLOBAL: libc::c_int = 1;const MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE: libc::c_int = 32;@@ -77,7 +72,7 @@ mod details {Ok(())}- fn membarrier(barrier: libc::c_int) -> Result<()> {+ fn membarrier(barrier: libc::c_int) -> io::Result<()> {let flags: libc::c_int = 0;let res = unsafe { syscall(libc::SYS_membarrier, barrier, flags) };if res == 0 {@@ -134,7 +129,7 @@ fn riscv_flush_icache(start: u64, end: u64) -> Result<()> {)} {0 => { Ok(()) }- _ => Err(std::io::Error::last_os_error()),+ _ => Err(std::io::Error::last_os_error().into()),}}}diff --git a/crates/jit-icache-coherence/src/win.rs b/crates/jit-icache-coherence/src/win.rsindex 79b9333959..24a1887da2 100644--- a/crates/jit-icache-coherence/src/win.rs+++ b/crates/jit-icache-coherence/src/win.rs@@ -1,11 +1,10 @@use std::ffi::c_void;use std::io::Error;+use wasmtime_core::error::Result;use windows_sys::Win32::System::Diagnostics::Debug::FlushInstructionCache;use windows_sys::Win32::System::Threading::FlushProcessWriteBuffers;use windows_sys::Win32::System::Threading::GetCurrentProcess;-pub use std::io::Result;-/// See docs on [crate::pipeline_flush_mt] for a description of what this function is trying to do.#[inline]pub(crate) fn pipeline_flush_mt() -> Result<()> {@@ -39,7 +38,7 @@ pub(crate) fn clear_cache(ptr: *const c_void, len: usize) -> Result<()> {unsafe {let res = FlushInstructionCache(GetCurrentProcess(), ptr, len);if res == 0 {- return Err(Error::last_os_error());+ return Err(Error::last_os_error().into());}}diff --git a/crates/wiggle/generate/src/config.rs b/crates/wiggle/generate/src/config.rsindex 43dd2bffa1..0b6b6c6c9d 100644--- a/crates/wiggle/generate/src/config.rs+++ b/crates/wiggle/generate/src/config.rs@@ -175,7 +175,7 @@ impl Parse for Config {}}-/// The witx document(s) that will be loaded from a [`Config`](struct.Config.html).+/// The witx document(s) that will be loaded from a [`Config`].////// A witx interface definition can be provided either as a collection of relative paths to/// documents, or as a single inlined string literal. Note that `(use ...)` directives are not