diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1dbf33a4679..259c8cb85ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,6 +134,13 @@ jobs: tier: 2 kind: wgpu-only + # NetBSD + - name: NetBSD x86_64 + os: ubuntu-24.04 + target: x86_64-unknown-netbsd + tier: 2 + kind: wgpu-only + # Android - name: Android aarch64 os: ubuntu-24.04 diff --git a/deno_webgpu/byow.rs b/deno_webgpu/byow.rs index c6e6e71688d..54016fa6ab8 100644 --- a/deno_webgpu/byow.rs +++ b/deno_webgpu/byow.rs @@ -6,6 +6,7 @@ use std::ffi::c_void; target_os = "linux", target_os = "macos", target_os = "freebsd", + target_os = "netbsd", target_os = "openbsd" ))] use std::ptr::NonNull; @@ -29,6 +30,7 @@ pub enum ByowError { target_os = "windows", target_os = "linux", target_os = "freebsd", + target_os = "netbsd", target_os = "openbsd", )))] #[class(type)] @@ -56,6 +58,7 @@ pub enum ByowError { #[cfg(any( target_os = "linux", target_os = "freebsd", + target_os = "netbsd", target_os = "openbsd" ))] #[class(type)] @@ -65,6 +68,7 @@ pub enum ByowError { target_os = "windows", target_os = "linux", target_os = "freebsd", + target_os = "netbsd", target_os = "openbsd" ))] #[class(type)] @@ -73,6 +77,7 @@ pub enum ByowError { #[cfg(any( target_os = "linux", target_os = "freebsd", + target_os = "netbsd", target_os = "openbsd" ))] #[class(type)] @@ -322,7 +327,12 @@ fn raw_window( Ok((win_handle, display_handle)) } -#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))] +#[cfg(any( + target_os = "linux", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd" +))] fn raw_window( system: UnsafeWindowSurfaceSystem, window: *const c_void, @@ -364,6 +374,7 @@ fn raw_window( target_os = "windows", target_os = "linux", target_os = "freebsd", + target_os = "netbsd", target_os = "openbsd", )))] fn raw_window(