Skip to content

Commit b2f00b2

Browse files
committed
fix(windows): disable windows for webgpu
Signed-off-by: Bailey Hayes <behayes2@gmail.com>
1 parent 350b77c commit b2f00b2

File tree

5 files changed

+23
-11
lines changed

5 files changed

+23
-11
lines changed

.github/workflows/wash.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
os:
3737
- ubuntu-latest
3838
- macos-latest
39-
# - windows-latest
39+
- windows-latest
4040
steps:
4141
- name: Checkout
4242
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -161,11 +161,11 @@ jobs:
161161
artifact: wash-aarch64-apple-darwin
162162
runner: macos-latest
163163
bin: wash
164-
# - target: x86_64-pc-windows-msvc
165-
# buildCommand: cargo build
166-
# artifact: wash-x86_64-pc-windows-msvc
167-
# runner: windows-latest
168-
# bin: wash.exe
164+
- target: x86_64-pc-windows-msvc
165+
buildCommand: cargo build
166+
artifact: wash-x86_64-pc-windows-msvc
167+
runner: windows-latest
168+
bin: wash.exe
169169
steps:
170170
- name: Checkout
171171
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ tests/output
1212
# Ignore Rust target directory
1313
target/
1414

15+
# Ignore build artifacts
16+
wash.exe
17+
1518
# Ignore worktrees
1619
worktrees/
1720

Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,17 @@ url = { workspace = true }
5858
wasm-metadata = { workspace = true }
5959
wasm-pkg-client = { workspace = true }
6060
wasm-pkg-core = { workspace = true }
61-
wash-runtime = { workspace = true, features = ["washlet", "oci", "wasi-http", "wasi-config", "wasi-logging", "wasi-webgpu"] }
61+
wash-runtime = { workspace = true, features = ["washlet", "oci", "wasi-http", "wasi-config", "wasi-logging"] }
6262
wasmtime = { workspace = true }
6363
wasmtime-wasi = { workspace = true }
6464
which = { workspace = true }
6565
wit-component = { workspace = true }
6666

67+
# Enable WebGPU support on non-Windows platforms
68+
# WebGPU is disabled on Windows due to dependency version conflicts with the windows crate
69+
[target.'cfg(not(target_os = "windows"))'.dependencies]
70+
wash-runtime = { workspace = true, features = ["wasi-webgpu"] }
71+
6772
[workspace.dependencies]
6873
anyhow = { version = "1.0.98", default-features = false }
6974
async-nats = { version = "0.44", default-features = false }

crates/wash/src/cli/dev.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ use notify::{
1818
};
1919
use tokio::{select, sync::mpsc};
2020
use tracing::{debug, error, info, trace, warn};
21+
#[cfg(not(target_os = "windows"))]
22+
use wash_runtime::plugin::wasi_webgpu::WasiWebGpu;
2123
use wash_runtime::{
2224
host::{Host, HostApi},
23-
plugin::{
24-
wasi_config::WasiConfig, wasi_http::HttpServer, wasi_logging::WasiLogging,
25-
wasi_webgpu::WasiWebGpu,
26-
},
25+
plugin::{wasi_config::WasiConfig, wasi_http::HttpServer, wasi_logging::WasiLogging},
2726
types::{
2827
Component, HostPathVolume, LocalResources, Volume, VolumeMount, VolumeType, Workload,
2928
WorkloadStartRequest, WorkloadState, WorkloadStopRequest,
@@ -61,6 +60,7 @@ pub struct DevCommand {
6160
pub wasi_config: Vec<String>,
6261

6362
/// Enable WASI WebGPU support
63+
#[cfg(not(target_os = "windows"))]
6464
#[clap(long = "wasi-webgpu", default_value_t = false)]
6565
pub wasi_webgpu: bool,
6666

@@ -242,6 +242,7 @@ impl CliCommand for DevCommand {
242242
debug!("Logging plugin registered");
243243

244244
// Enable WASI WebGPU if requested
245+
#[cfg(not(target_os = "windows"))]
245246
if self.wasi_webgpu {
246247
host_builder = host_builder.with_plugin(Arc::new(WasiWebGpu::default()))?;
247248
debug!("WASI WebGPU plugin registered");

crates/wash/src/cli/host.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use std::{net::SocketAddr, sync::Arc};
33
use anyhow::Context as _;
44
use clap::Args;
55
use tracing::info;
6+
#[cfg(not(target_os = "windows"))]
67
use wash_runtime::plugin::wasi_webgpu::WasiWebGpu;
78

89
use crate::cli::{CliCommand, CliContext, CommandOutput};
@@ -30,6 +31,7 @@ pub struct HostCommand {
3031
pub http_addr: Option<SocketAddr>,
3132

3233
/// Enable WASI WebGPU support
34+
#[cfg(not(target_os = "windows"))]
3335
#[clap(long = "wasi-webgpu", default_value_t = false)]
3436
pub wasi_webgpu: bool,
3537
}
@@ -82,6 +84,7 @@ impl CliCommand for HostCommand {
8284
}
8385

8486
// Enable WASI WebGPU if requested
87+
#[cfg(not(target_os = "windows"))]
8588
if self.wasi_webgpu {
8689
tracing::info!("WASI WebGPU support enabled");
8790
cluster_host_builder =

0 commit comments

Comments
 (0)