gfx-rs / wgpu-rs

Rust bindings to wgpu native library
https://wgpu.rs
Mozilla Public License 2.0
1.69k stars 186 forks source link

Don't pin web-sys and wasm-bindgen versions #847

Closed RichoDemus closed 3 years ago

RichoDemus commented 3 years ago

Pinning them forces all downstream dependencies to use exactly this version

The latest release of wgpu has pinned an old version of wasm-bindgen, forcing users to downgrade wasm-bindgen-cli in order to build

grovesNL commented 3 years ago

Hi! :wave: The WebGPU WebIDL is unstable, so the API often has breaking changes in web-sys between releases (i.e. not following semver). This also means we can't automatically use new versions of web-sys, because it would break this crate and any crates depending on it. Until it's stabilized we keep web-sys pinned and try to bump it regularly.

The web-sys unstable API versioning is discussed in https://rustwasm.github.io/wasm-bindgen/web-sys/unstable-apis.html (which is what we have to use for WebGPU at the moment).

RichoDemus commented 3 years ago

I see, does the same apply for wasm-bindgen or can I modify the PR to just remove the pin there?

edit: I did it, hopefully we can remove the wasm-bindgen pin :)

grovesNL commented 3 years ago

Yeah it's probably ok to unpin wasm-bindgen, but we'd need to change our examples publish action (e.g. possibly updating wasm-bindgen to latest before running the CLI) which needs the versions of wasm-bindgen and wasm-bindgen-cli to match exactly.

bors[bot] commented 3 years ago

Build succeeded: