Skip to content

Commit 4b7a823

Browse files
committed
Upgrade WGPU and Linebender dependencies (#4154)
* Upgrade WGPU and Linebender dependencies * Fix CI * Code review fixes * Fix again
1 parent c4a9780 commit 4b7a823

24 files changed

Lines changed: 418 additions & 358 deletions

File tree

.cargo/config.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[build]
2+
# Keep `--cfg=web_sys_unstable_apis` here so the wasm wrapper crates build with the same web-sys API signatures (e.g. `put_image_data`/`get_image_data` taking `i32` rather than `f64`) on both native test builds and the wasm target. Cargo applies `[build]` rustflags only when no target-specific rustflags table matches, so the wasm-specific list below must continue to include this cfg.
3+
rustflags = ["--cfg=web_sys_unstable_apis"]
4+
15
[target.wasm32-unknown-unknown]
26
rustflags = [
37
# Currently disabled because of https://github.com/GraphiteEditor/Graphite/issues/1262

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"ghcr.io/devcontainers/features/node:1": {}
88
},
9-
"onCreateCommand": "cargo install cargo-watch wasm-pack cargo-about && cargo install -f wasm-bindgen-cli@0.2.100",
9+
"onCreateCommand": "cargo install cargo-watch wasm-pack cargo-about && cargo install -f wasm-bindgen-cli@0.2.121",
1010
"customizations": {
1111
"vscode": {
1212
// NOTE: Keep this in sync with `.vscode/extensions.json`

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ jobs:
283283
pull-requests: write
284284

285285
env:
286-
WASM_BINDGEN_CLI_VERSION: "0.2.100"
286+
WASM_BINDGEN_CLI_VERSION: "0.2.121"
287287

288288
steps:
289289
- name: 📥 Clone repository
@@ -474,7 +474,7 @@ jobs:
474474
pull-requests: write
475475

476476
env:
477-
WASM_BINDGEN_CLI_VERSION: "0.2.100"
477+
WASM_BINDGEN_CLI_VERSION: "0.2.121"
478478

479479
steps:
480480
- name: 📥 Clone repository

.github/workflows/check.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ jobs:
5757

5858
- name: 🧪 Run Rust tests
5959
env:
60-
RUSTFLAGS: -Dwarnings
60+
# `--cfg=web_sys_unstable_apis` mirrors the `[build]` section of `.cargo/config.toml`
61+
RUSTFLAGS: "-Dwarnings --cfg=web_sys_unstable_apis"
6162
run: mold -run cargo test --all-features
6263

6364
# Rust format check on GitHub runner

.nix/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ let
1616

1717
pkgs = import inputs.nixpkgs {
1818
inherit system;
19-
overlays = [ (import inputs.rust-overlay) ];
19+
overlays = [
20+
(import inputs.rust-overlay)
21+
(import ./overlays/wasm-bindgen-cli.nix)
22+
];
2023
};
2124

2225
info = {

.nix/dev.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ let
1313
pkgs.libGL
1414
pkgs.openssl
1515
pkgs.libraw
16+
pkgs.fontconfig
1617

1718
# X11 Support
1819
pkgs.libxkbcommon
@@ -29,7 +30,7 @@ pkgs.mkShell (
2930
pkgs.lld
3031
pkgs.nodejs
3132
pkgs.binaryen
32-
pkgs.wasm-bindgen-cli_0_2_100
33+
pkgs.wasm-bindgen-cli_0_2_121
3334
pkgs.wasm-pack
3435
pkgs.cargo-about
3536

.nix/overlays/wasm-bindgen-cli.nix

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Backport of nixpkgs's `wasm-bindgen-cli_0_2_121` for the nixpkgs revision
2+
# pinned in flake.lock (which ships only up to `_0_2_117`). Mirrors upstream
3+
# `pkgs/by-name/wa/wasm-bindgen-cli_0_2_121/package.nix` verbatim. Same
4+
# `buildWasmBindgenCli` helper, same hashes. Drop this overlay once flake.lock
5+
# is bumped to a nixpkgs that exposes the attribute directly.
6+
final: _prev: {
7+
wasm-bindgen-cli_0_2_121 = final.buildWasmBindgenCli rec {
8+
src = final.fetchCrate {
9+
pname = "wasm-bindgen-cli";
10+
version = "0.2.121";
11+
hash = "sha256-ZOMgFNOcGkO66Jz/Z83eoIu+DIzo3Z/vq6Z5g6BDY/w=";
12+
};
13+
14+
cargoDeps = final.rustPlatform.fetchCargoVendor {
15+
inherit src;
16+
inherit (src) pname version;
17+
hash = "sha256-DPdCDPTAPBrbqLUqnCwQu1dePs9lGg85JCJOCIr9qjU=";
18+
};
19+
};
20+
}

.nix/pkgs/graphite-cef.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{ pkgs, ... }:
22

33
let
4-
version = "147.0.10+gd58e84d+chromium-147.0.7727.118";
4+
version = "147.0.14+g76d2442+chromium-147.0.7727.138";
55
hashes = {
6-
aarch64-linux = "sha256-kaRijMDacPcoeCcS31zmRSNOvgozx+uq2M34mD28bu4=";
7-
x86_64-linux = "sha256-CHzPofBDhCniDZEpOxXK4I7p57SYjMAY1HVo3Vna0e8=";
6+
aarch64-linux = "sha256-Gy2Xs1NHwmIr+buzoqDso1QJVkKlA/UMXytHjNGqpNk=";
7+
x86_64-linux = "sha256-os7wAFJ+mVK65HCikvEjhMeQUj2ty7y+6Ad0OlOcbeA=";
88
};
99

1010
selectSystem =

.nix/pkgs/graphite.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ let
2020
pkgs.libGL
2121
pkgs.openssl
2222
pkgs.libraw
23+
pkgs.fontconfig
2324
# X11 Support
2425
pkgs.libxkbcommon
2526
pkgs.libXcursor
@@ -83,7 +84,7 @@ deps.crane.lib.buildPackage (
8384
pkgs.lld
8485
pkgs.nodejs
8586
pkgs.binaryen
86-
pkgs.wasm-bindgen-cli_0_2_100
87+
pkgs.wasm-bindgen-cli_0_2_121
8788
pkgs.wasm-pack
8889
pkgs.cargo-about
8990
pkgs.removeReferencesTo

0 commit comments

Comments
 (0)