From dfb17a685db2eaf2d5b004b1ac2249b76b483246 Mon Sep 17 00:00:00 2001 From: Ian McLaughlin Date: Mon, 25 May 2026 23:21:01 -0400 Subject: [PATCH 1/3] Use bevy_platform::time::Instant in the script pipeline std::time::Instant::now() panics at runtime on wasm32-unknown-unknown. --- crates/bevy_mod_scripting_core/src/pipeline/machines.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_mod_scripting_core/src/pipeline/machines.rs b/crates/bevy_mod_scripting_core/src/pipeline/machines.rs index 509cc1312e..a4d29bc77b 100644 --- a/crates/bevy_mod_scripting_core/src/pipeline/machines.rs +++ b/crates/bevy_mod_scripting_core/src/pipeline/machines.rs @@ -2,7 +2,7 @@ use std::{ future::ready, pin::Pin, task::{Poll, Waker}, - time::{Duration, Instant}, + time::Duration, }; use bevy_ecs::{event::Event, world::Mut}; @@ -12,7 +12,7 @@ use bevy_mod_scripting_bindings::{ }; use bevy_mod_scripting_script::ScriptAttachment; use bevy_mod_scripting_world::{WorldAccessGuard, WorldGuard}; -use bevy_platform::collections::HashMap; +use bevy_platform::{collections::HashMap, time::Instant}; use super::*; From d150e2fd95a4f24a524e7e42189d0c0f8609bb5b Mon Sep 17 00:00:00 2001 From: Ian M <50029473+ianm199@users.noreply.github.com> Date: Wed, 27 May 2026 15:59:43 -0400 Subject: [PATCH 2/3] ci: bump pinned toolchain 1.89.0 -> 1.91.0 CI is red on every job, but not from this change: the benchmark/diff jobs fail installing bencher because its current source uses Duration::from_hours, which is only const-stable on Rust >= 1.91, while rust-toolchain.toml pins 1.89.0. The build/test matrix also trips over the pinned toolchain (clippy component missing) and gets cancelled by fail-fast. Bump the pin to 1.91.0 and declare the clippy/rustfmt components so the toolchain is complete. --- rust-toolchain.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index b67e7d5348..fdfacc4fb0 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,3 @@ [toolchain] -channel = "1.89.0" +channel = "1.91.0" +components = ["clippy", "rustfmt"] From 96f8e04eaada04630a57a8246275e320088af127 Mon Sep 17 00:00:00 2001 From: Ian M <50029473+ianm199@users.noreply.github.com> Date: Wed, 27 May 2026 16:56:29 -0400 Subject: [PATCH 3/3] test: update expected type_name for Rust 1.91 Rust 1.91 renders the elided lifetime in std::any::type_name output, so ScriptFunction is now ScriptFunction<'_, fn(..)>. Update the hardcoded expected function name in test_invalid_amount_of_args_errors_nicely to match. Companion to the 1.91 toolchain bump. --- .../bevy_mod_scripting_bindings/src/function/script_function.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_mod_scripting_bindings/src/function/script_function.rs b/crates/bevy_mod_scripting_bindings/src/function/script_function.rs index 152f7ebb9d..d8d9bad24c 100644 --- a/crates/bevy_mod_scripting_bindings/src/function/script_function.rs +++ b/crates/bevy_mod_scripting_bindings/src/function/script_function.rs @@ -793,7 +793,7 @@ mod test { assert!(out.is_err()); let gotten = out.unwrap_err(); - let expected_function_name = " usize>>::into_dynamic_script_function::{{closure}}"; + let expected_function_name = " usize>>::into_dynamic_script_function::{{closure}}"; let expected_namespace = Namespace::Global; if let InteropError::FunctionInteropError {