From 7eaa3951138c6efeb0ef5fc50e2dcc09a6f8292a Mon Sep 17 00:00:00 2001 From: cions Date: Sun, 25 Aug 2024 22:59:11 +0900 Subject: [PATCH] fix(ext/webgpu): allow to build on unsupported platforms (#25202) --- ext/webgpu/byow.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ext/webgpu/byow.rs b/ext/webgpu/byow.rs index fa3ce2d966..3a43f416e5 100644 --- a/ext/webgpu/byow.rs +++ b/ext/webgpu/byow.rs @@ -148,3 +148,18 @@ fn raw_window( Ok((win_handle, display_handle)) } + +#[cfg(not(any( + target_os = "macos", + target_os = "windows", + target_os = "linux", + target_os = "freebsd", + target_os = "openbsd", +)))] +fn raw_window( + _system: &str, + _window: *const c_void, + _display: *const c_void, +) -> Result { + Err(type_error("Unsupported platform")) +}