diff --git a/CHANGELOG.md b/CHANGELOG.md index e4a2bd1f8f..df77e009c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,7 @@ the same every time it is rendered, we now warn if it is missing. #### General - Improve the validation and error reporting of buffer mappings by @nical in [#2848](https://github.com/gfx-rs/wgpu/pull/2848) +- Fix compilation errors when using wgpu-core in isolation while targetting `wasm32-unknown-unknown` by @Seamooo in [#2922](https://github.com/gfx-rs/wgpu/pull/2922) - Fixed opening of RenderDoc library by @abuffseagull in [#2930](https://github.com/gfx-rs/wgpu/pull/2930) ### Changes diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index 7b5b5e4b67..61bb72f6ca 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -56,9 +56,11 @@ path = "../wgpu-hal" package = "wgpu-hal" version = "0.13" +[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies] +web-sys = { version = "0.3", features = ["HtmlCanvasElement", "OffscreenCanvas"] } + [target.'cfg(target_arch = "wasm32")'.dependencies] hal = { path = "../wgpu-hal", package = "wgpu-hal", version = "0.13", features = ["gles"] } -web-sys = { version = "0.3", features = ["HtmlCanvasElement"] } [target.'cfg(all(not(target_arch = "wasm32"), any(target_os = "ios", target_os = "macos")))'.dependencies] hal = { path = "../wgpu-hal", package = "wgpu-hal", version = "0.13", features = ["metal"] } diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index 8fe4aef58e..b2d675100d 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -88,7 +88,7 @@ core-graphics-types = "0.1" [target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies] wasm-bindgen = { version = "0.2" } -web-sys = { version = "0.3", features = ["Window", "HtmlCanvasElement", "WebGl2RenderingContext"] } +web-sys = { version = "0.3", features = ["Window", "HtmlCanvasElement", "WebGl2RenderingContext", "OffscreenCanvas"] } js-sys = { version = "0.3" } [target.'cfg(target_os = "android")'.dependencies]