bevy/crates
François 80f2ee2910
WebGPU: fix web-sys version (#11894)
# Objective

- Being able to build for WebGPU

```
error[E0061]: this function takes 1 argument but 3 arguments were supplied
   --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:375:22
    |
375 |     let mut mapped = web_sys::GpuDepthStencilState::new(
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
376 |         map_compare_function(desc.depth_compare),
    |         ---------------------------------------- unexpected argument of type `GpuCompareFunction`
377 |         desc.depth_write_enabled,
    |         ------------------------ unexpected argument of type `bool`
    |
note: associated function defined here
   --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/web-sys-0.3.68/src/features/gen_GpuDepthStencilState.rs:27:12
    |
27  |     pub fn new(format: GpuTextureFormat) -> Self {
    |            ^^^
help: remove the extra arguments
    |
376 -         map_compare_function(desc.depth_compare),
376 +         map_texture_format(desc.format),
    |

error[E0061]: this function takes 1 argument but 2 arguments were supplied
    --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:1693:13
     |
1693 |             web_sys::GpuVertexState::new(desc.vertex.entry_point, &module.0);
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -------------------------
     |                                          |
     |                                          unexpected argument of type `&str`
     |                                          help: remove the extra argument
     |
note: associated function defined here
    --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/web-sys-0.3.68/src/features/gen_GpuVertexState.rs:27:12
     |
27   |     pub fn new(module: &GpuShaderModule) -> Self {
     |            ^^^

error[E0061]: this function takes 2 arguments but 3 arguments were supplied
    --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:1768:17
     |
1768 |                 web_sys::GpuFragmentState::new(frag.entry_point, &module.0, &targets);
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ----------------             -------- unexpected argument of type `&js_sys::Array`
     |                                                |
     |                                                expected `&GpuShaderModule`, found `&str`
     |
     = note: expected reference `&GpuShaderModule`
                found reference `&str`
note: associated function defined here
    --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/web-sys-0.3.68/src/features/gen_GpuFragmentState.rs:27:12
     |
27   |     pub fn new(module: &GpuShaderModule, targets: &::wasm_bindgen::JsValue) -> Self {
     |            ^^^
help: remove the extra argument
     |
1768 -                 web_sys::GpuFragmentState::new(frag.entry_point, &module.0, &targets);
1768 +                 web_sys::GpuFragmentState::new(/* &GpuShaderModule */, &module.0);
     |

error[E0061]: this function takes 1 argument but 2 arguments were supplied
    --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:1793:13
     |
1793 |             web_sys::GpuProgrammableStage::new(desc.entry_point, &shader_module.0);
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------
     |                                                |
     |                                                unexpected argument of type `&str`
     |                                                help: remove the extra argument
     |
note: associated function defined here
    --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/web-sys-0.3.68/src/features/gen_GpuProgrammableStage.rs:27:12
     |
27   |     pub fn new(module: &GpuShaderModule) -> Self {
     |            ^^^

error[E0599]: no method named `write_timestamp` found for struct `GpuCommandEncoder` in the current scope
    --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:2505:14
     |
2503 | /         encoder_data
2504 | |             .0
2505 | |             .write_timestamp(&query_set_data.0, query_index);
     | |             -^^^^^^^^^^^^^^^ method not found in `GpuCommandEncoder`
     | |_____________|
     |

Some errors have detailed explanations: E0061, E0599.
For more information about an error, try `rustc --explain E0061`.
```

## Solution

- `web-sys` doesn't follow semver for the WebGPU APIs as they are
unstable. Force using a compatible version

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-02-16 17:45:29 +00:00
..
bevy_a11y Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_animation Add type registrations for animation types (#11889) 2024-02-16 13:17:42 +00:00
bevy_app Use TypeIdMap whenever possible (#11684) 2024-02-03 23:47:04 +00:00
bevy_asset Fix asset loader registration warning (#11870) 2024-02-16 16:30:10 +00:00
bevy_audio Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_core Add type registrations for animation types (#11889) 2024-02-16 13:17:42 +00:00
bevy_core_pipeline Support optional clear color in ColorAttachment. (#11884) 2024-02-16 13:25:55 +00:00
bevy_derive Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_diagnostic Fix sysinfo CPU brand output (#11850) 2024-02-13 19:26:20 +00:00
bevy_dylib Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_dynamic_plugin bevy_dynamic_plugin: fix unsafe_op_in_unsafe_fn lint (#11622) 2024-02-12 15:06:00 +00:00
bevy_ecs Use question mark operator when possible (#11865) 2024-02-14 18:44:33 +00:00
bevy_ecs_compile_fail_tests Deprecated Various Component Methods from Query and QueryState (#9920) 2024-02-04 01:01:59 +00:00
bevy_encase_derive Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_gilrs Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_gizmos Overwrite gizmo group in insert_gizmo_group (#11860) 2024-02-14 16:20:16 +00:00
bevy_gltf Move EntityHash related types into bevy_ecs (#11498) 2024-02-12 15:02:24 +00:00
bevy_hierarchy Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_input Derive Ord for GamepadButtonType. (#11791) 2024-02-11 09:03:06 +00:00
bevy_internal mipmap levels can be 0 and they should be interpreted as 1 (#11767) 2024-02-11 22:00:07 +00:00
bevy_log Update tracing-tracy requirement from 0.10.4 to 0.11.0 and tracy-client requirement from 0.16.4 to 0.17.0 (#11678) 2024-02-03 21:44:38 +00:00
bevy_macro_utils Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_macros_compile_fail_tests Standardize toml format with taplo (#10594) 2023-11-21 01:04:14 +00:00
bevy_math Implement Meshable for some 3D primitives (#11688) 2024-02-06 21:44:13 +00:00
bevy_mikktspace Replace pointer castings (as) by their API equivalent (#11818) 2024-02-11 23:19:36 +00:00
bevy_pbr irradiance: use textureSampleLevel for WebGPU support (#11893) 2024-02-16 13:35:16 +00:00
bevy_ptr Replace pointer castings (as) by their API equivalent (#11818) 2024-02-11 23:19:36 +00:00
bevy_reflect bevy_reflect_derive: Clean up attribute logic (#11777) 2024-02-12 15:16:27 +00:00
bevy_reflect_compile_fail_tests bevy_reflect_derive: Clean up attribute logic (#11777) 2024-02-12 15:16:27 +00:00
bevy_render WebGPU: fix web-sys version (#11894) 2024-02-16 17:45:29 +00:00
bevy_scene Move EntityHash related types into bevy_ecs (#11498) 2024-02-12 15:02:24 +00:00
bevy_sprite Call a TextureAtlasLayout a layout and not an atlas (#11783) 2024-02-13 16:08:03 +00:00
bevy_tasks Fix a few Clippy lints (#11866) 2024-02-14 19:07:18 +00:00
bevy_text Use warn_once where relevant instead of manually implementing a single warn check (#11693) 2024-02-05 21:05:43 +00:00
bevy_time Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_transform Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_ui Rename Core Render Graph Labels (#11882) 2024-02-15 23:15:16 +00:00
bevy_utils Move EntityHash related types into bevy_ecs (#11498) 2024-02-12 15:02:24 +00:00
bevy_window Add delta to CursorMoved event (#11710) 2024-02-12 18:14:22 +00:00
bevy_winit Add delta to CursorMoved event (#11710) 2024-02-12 18:14:22 +00:00