From 54d30da44a48cbaec0ab7b81e228af726066dc0c Mon Sep 17 00:00:00 2001 From: Andy Leiserson Date: Tue, 10 Jun 2025 10:19:42 -0700 Subject: [PATCH] Fix the publish job (#7783) --- examples/features/Cargo.toml | 5 ++++- wgpu/src/api/shader_module.rs | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/features/Cargo.toml b/examples/features/Cargo.toml index 148d7b40b..b11ba7fc8 100644 --- a/examples/features/Cargo.toml +++ b/examples/features/Cargo.toml @@ -63,7 +63,10 @@ console_log.workspace = true fern.workspace = true wasm-bindgen.workspace = true wasm-bindgen-futures.workspace = true -wgpu = { path = "../../wgpu", default-features = false, features = ["wgsl"] } +wgpu = { path = "../../wgpu", default-features = false, features = [ + "wgsl", + "std", +] } # We need these features in the framework examples and tests web-sys = { workspace = true, features = [ "Location", diff --git a/wgpu/src/api/shader_module.rs b/wgpu/src/api/shader_module.rs index c4d7a5183..1a84d5414 100644 --- a/wgpu/src/api/shader_module.rs +++ b/wgpu/src/api/shader_module.rs @@ -1,8 +1,4 @@ -use alloc::{ - string::{String, ToString as _}, - vec, - vec::Vec, -}; +use alloc::{string::String, vec::Vec}; use core::{future::Future, marker::PhantomData}; use crate::*; @@ -98,6 +94,7 @@ impl From> for CompilationInfo { fn from(value: crate::naga::error::ShaderError) -> Self { + use alloc::{string::ToString, vec}; CompilationInfo { messages: vec![CompilationMessage { message: value.to_string(), @@ -110,6 +107,7 @@ impl From> #[cfg(feature = "glsl")] impl From> for CompilationInfo { fn from(value: naga::error::ShaderError) -> Self { + use alloc::string::ToString; let messages = value .inner .errors @@ -127,6 +125,7 @@ impl From> for Compilat #[cfg(feature = "spirv")] impl From> for CompilationInfo { fn from(value: naga::error::ShaderError) -> Self { + use alloc::{string::ToString, vec}; CompilationInfo { messages: vec![CompilationMessage { message: value.to_string(), @@ -148,6 +147,7 @@ impl crate::naga::WithSpan, >, ) -> Self { + use alloc::{string::ToString, vec}; CompilationInfo { messages: vec![CompilationMessage { message: value.to_string(),