diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2023-01-30 15:14:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 15:14:16 +0100 |
commit | 3035dee9f14402f57d42ff0b362152140b4dca13 (patch) | |
tree | b9a3d3d36e368b3585970ffe00127c90e16b7a09 /tools/wgpu_sync.js | |
parent | 266915d5ce354fde12b20f8f5ceb5ffdfacb7983 (diff) |
chore: update webgpu (#17534)
Diffstat (limited to 'tools/wgpu_sync.js')
-rwxr-xr-x | tools/wgpu_sync.js | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/tools/wgpu_sync.js b/tools/wgpu_sync.js index ba3267042..6c6130d39 100755 --- a/tools/wgpu_sync.js +++ b/tools/wgpu_sync.js @@ -3,9 +3,9 @@ import { join, ROOT_PATH } from "./util.js"; -const COMMIT = "076df1a56812eee01614b7a3a4c88798012e79ab"; +const COMMIT = "659f6977051345e4e06ab4832c6f7d268f25a1ad"; const REPO = "gfx-rs/wgpu"; -const V_WGPU = "0.13"; +const V_WGPU = "0.15"; const TARGET_DIR = join(ROOT_PATH, "ext", "webgpu"); async function bash(subcmd, opts = {}) { @@ -59,21 +59,25 @@ async function patchCargo() { data .replace(/^version = .*/m, `version = "${vDenoWebgpu}"`) .replace( - /^wgpu-core \= .*$/gm, - `wgpu-core = { version = "${V_WGPU}", features = ["trace", "replay", "serde"] }`, + /^repository.workspace = true/m, + `repository = "https://github.com/gfx-rs/wgpu"`, ) .replace( - /^wgpu-types \= .*$/gm, - `wgpu-types = { version = "${V_WGPU}", features = ["trace", "replay", "serde"] }`, + /^serde = { workspace = true, features = ["derive"] }/m, + `serde.workspace = true`, + ) + .replace( + /^tokio = { workspace = true, features = ["full"] }/m, + `tokio.workspace = true`, ), - // .replace( - // /^wgpu-core \= .*$/gm, - // `wgpu-core = { git = "https://github.com/${REPO}", rev = "${COMMIT}", features = ["trace", "replay", "serde"] }`, - // ) - // .replace( - // /^wgpu-types \= .*$/gm, - // `wgpu-types = { git = "https://github.com/${REPO}", rev = "${COMMIT}", features = ["trace", "replay", "serde"] }`, - // ) + ); + + await patchFile( + join(ROOT_PATH, "Cargo.toml"), + (data) => + data + .replace(/^wgpu-core = .*/m, `wgpu-core = "${V_WGPU}"`) + .replace(/^wgpu-types = .*/m, `wgpu-types = "${V_WGPU}"`), ); } |