Skip to content

Commit 73b331d

Browse files
committed
Bump CI/node, optimize WASM & timestamp code
Upgrade CI workflows (actions/cache -> v5, download-artifact -> v6, setup-node -> Node 22) and add a Rust cache step for the dart bridge. Improve Docker healthcheck and test scripts to use a robust GET (-O /dev/null / curl) to avoid h2c/HEAD issues. Optimize link crate: pre-serialize WASM ping payload, use zero-copy gzip helper (decompress_if_gzip) for WS messages, add inline annotations and helper functions for validation to avoid allocations, and rewrite timestamp formatting to use write! into pre-sized buffers (with added regression tests). Bump WASM-related dependencies and update Cargo.toml accordingly.
1 parent 0d1d43f commit 73b331d

14 files changed

Lines changed: 282 additions & 108 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,23 @@ jobs:
5858
libssl-dev
5959
6060
- name: Cache cargo registry
61-
uses: actions/cache@v4
61+
uses: actions/cache@v5
6262
with:
6363
path: ~/.cargo/registry
6464
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
6565
restore-keys: |
6666
${{ runner.os }}-cargo-registry-
6767
6868
- name: Cache cargo index
69-
uses: actions/cache@v4
69+
uses: actions/cache@v5
7070
with:
7171
path: ~/.cargo/git
7272
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
7373
restore-keys: |
7474
${{ runner.os }}-cargo-index-
7575
7676
- name: Cache cargo build
77-
uses: actions/cache@v4
77+
uses: actions/cache@v5
7878
with:
7979
path: target
8080
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
@@ -106,23 +106,23 @@ jobs:
106106
# libssl-dev
107107

108108
# - name: Cache cargo registry
109-
# uses: actions/cache@v4
109+
# uses: actions/cache@v5
110110
# with:
111111
# path: ~/.cargo/registry
112112
# key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
113113
# restore-keys: |
114114
# ${{ runner.os }}-cargo-registry-
115115

116116
# - name: Cache cargo index
117-
# uses: actions/cache@v4
117+
# uses: actions/cache@v5
118118
# with:
119119
# path: ~/.cargo/git
120120
# key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
121121
# restore-keys: |
122122
# ${{ runner.os }}-cargo-index-
123123

124124
# - name: Cache cargo build
125-
# uses: actions/cache@v4
125+
# uses: actions/cache@v5
126126
# with:
127127
# path: target
128128
# key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
@@ -154,23 +154,23 @@ jobs:
154154
libssl-dev
155155
156156
- name: Cache cargo registry
157-
uses: actions/cache@v4
157+
uses: actions/cache@v5
158158
with:
159159
path: ~/.cargo/registry
160160
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
161161
restore-keys: |
162162
${{ runner.os }}-cargo-registry-
163163
164164
- name: Cache cargo index
165-
uses: actions/cache@v4
165+
uses: actions/cache@v5
166166
with:
167167
path: ~/.cargo/git
168168
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
169169
restore-keys: |
170170
${{ runner.os }}-cargo-index-
171171
172172
- name: Cache cargo build
173-
uses: actions/cache@v4
173+
uses: actions/cache@v5
174174
with:
175175
path: target
176176
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
@@ -310,10 +310,10 @@ jobs:
310310
with:
311311
toolchain: ${{ env.RUST_VERSION }}
312312

313-
- name: Setup Node 20
313+
- name: Setup Node 22
314314
uses: actions/setup-node@v6
315315
with:
316-
node-version: 20
316+
node-version: 22
317317

318318
- name: Install cargo-license
319319
shell: bash

.github/workflows/release.yml

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ jobs:
116116
with:
117117
toolchain: ${{ env.RUST_VERSION }}
118118

119-
- name: Setup Node 20
119+
- name: Setup Node 22
120120
uses: actions/setup-node@v6
121121
with:
122-
node-version: 20
122+
node-version: 22
123123

124124
- name: Install cargo-license
125125
shell: bash
@@ -213,10 +213,10 @@ jobs:
213213
shared-key: wasm-build
214214
cache-on-failure: true
215215

216-
- name: Setup Node 20
216+
- name: Setup Node 22
217217
uses: actions/setup-node@v6
218218
with:
219-
node-version: 20
219+
node-version: 22
220220

221221
- name: Install wasm-pack
222222
shell: bash
@@ -472,7 +472,7 @@ jobs:
472472
473473
- name: Download UI dist
474474
if: ${{ steps.vars.outputs.build_linux == 'true' }}
475-
uses: actions/download-artifact@v4
475+
uses: actions/download-artifact@v6
476476
with:
477477
name: ui-dist
478478
path: ui/dist
@@ -563,7 +563,7 @@ jobs:
563563
564564
- name: Download UI dist
565565
if: ${{ steps.vars.outputs.build_linux_arm == 'true' }}
566-
uses: actions/download-artifact@v4
566+
uses: actions/download-artifact@v6
567567
with:
568568
name: ui-dist
569569
path: ui/dist
@@ -720,7 +720,7 @@ jobs:
720720
721721
- name: Download UI dist
722722
if: ${{ steps.vars.outputs.build_windows == 'true' }}
723-
uses: actions/download-artifact@v4
723+
uses: actions/download-artifact@v6
724724
with:
725725
name: ui-dist
726726
path: ui/dist
@@ -837,7 +837,7 @@ jobs:
837837
838838
- name: Download UI dist
839839
if: ${{ steps.vars.outputs.build_macos == 'true' }}
840-
uses: actions/download-artifact@v4
840+
uses: actions/download-artifact@v6
841841
with:
842842
name: ui-dist
843843
path: ui/dist
@@ -1048,13 +1048,13 @@ jobs:
10481048
uses: actions/checkout@v6
10491049

10501050
- name: Download server binary
1051-
uses: actions/download-artifact@v4
1051+
uses: actions/download-artifact@v6
10521052
with:
10531053
name: dist-linux-x86_64
10541054
path: dist/
10551055

10561056
- name: Download CLI binary
1057-
uses: actions/download-artifact@v4
1057+
uses: actions/download-artifact@v6
10581058
with:
10591059
name: dist-cli-linux-x86_64
10601060
path: dist/
@@ -1219,7 +1219,7 @@ jobs:
12191219
uses: actions/checkout@v6
12201220

12211221
- name: Download server binary
1222-
uses: actions/download-artifact@v4
1222+
uses: actions/download-artifact@v6
12231223
with:
12241224
name: dist-linux-x86_64
12251225
path: dist/
@@ -1443,7 +1443,7 @@ jobs:
14431443
git push origin main
14441444
14451445
- name: Download all artifacts
1446-
uses: actions/download-artifact@v4
1446+
uses: actions/download-artifact@v6
14471447
with:
14481448
path: release-assets
14491449
pattern: 'dist-*'
@@ -1535,25 +1535,25 @@ jobs:
15351535
echo "docker_image_created=$DOCKER_IMAGE_CREATED" >> "$GITHUB_OUTPUT"
15361536
15371537
- name: Download pre-built artifacts (x86_64)
1538-
uses: actions/download-artifact@v4
1538+
uses: actions/download-artifact@v6
15391539
with:
15401540
name: dist-linux-x86_64
15411541
path: artifacts/server-amd64
15421542

15431543
- name: Download pre-built CLI artifact (x86_64)
1544-
uses: actions/download-artifact@v4
1544+
uses: actions/download-artifact@v6
15451545
with:
15461546
name: dist-cli-linux-x86_64
15471547
path: artifacts/cli-amd64
15481548

15491549
- name: Download pre-built artifacts (aarch64)
1550-
uses: actions/download-artifact@v4
1550+
uses: actions/download-artifact@v6
15511551
with:
15521552
name: dist-linux-aarch64
15531553
path: artifacts/server-arm64
15541554

15551555
- name: Download pre-built CLI artifact (aarch64)
1556-
uses: actions/download-artifact@v4
1556+
uses: actions/download-artifact@v6
15571557
with:
15581558
name: dist-cli-linux-aarch64
15591559
path: artifacts/cli-arm64
@@ -1818,7 +1818,7 @@ jobs:
18181818
echo "value=$DESCRIPTION" >> "$GITHUB_OUTPUT"
18191819
18201820
- name: Download PG extension artifact (x86_64)
1821-
uses: actions/download-artifact@v4
1821+
uses: actions/download-artifact@v6
18221822
with:
18231823
name: dist-pg-extension-linux-x86_64
18241824
path: pg-artifacts-amd64/
@@ -1999,7 +1999,7 @@ jobs:
19991999
uses: actions/checkout@v6
20002000

20012001
- name: Download server binary
2002-
uses: actions/download-artifact@v4
2002+
uses: actions/download-artifact@v6
20032003
with:
20042004
name: dist-linux-x86_64
20052005
path: dist/
@@ -2023,10 +2023,10 @@ jobs:
20232023
shared-key: sdk-tests-typescript
20242024
cache-on-failure: true
20252025

2026-
- name: Setup Node 20
2026+
- name: Setup Node 22
20272027
uses: actions/setup-node@v6
20282028
with:
2029-
node-version: 20
2029+
node-version: 22
20302030

20312031
- name: Install wasm-pack
20322032
shell: bash
@@ -2137,7 +2137,7 @@ jobs:
21372137
uses: actions/checkout@v6
21382138

21392139
- name: Download server binary
2140-
uses: actions/download-artifact@v4
2140+
uses: actions/download-artifact@v6
21412141
with:
21422142
name: dist-linux-x86_64
21432143
path: dist/
@@ -2149,6 +2149,18 @@ jobs:
21492149
sudo apt-get install -y --no-install-recommends \
21502150
clang libclang-dev pkg-config libssl-dev
21512151
2152+
- name: Setup Rust
2153+
uses: dtolnay/rust-toolchain@stable
2154+
with:
2155+
toolchain: ${{ env.RUST_VERSION }}
2156+
2157+
- name: Cache Rust (dart bridge)
2158+
uses: Swatinem/rust-cache@v2
2159+
with:
2160+
shared-key: dart-bridge
2161+
cache-on-failure: true
2162+
workspaces: link -> link/target
2163+
21522164
- name: Setup Flutter
21532165
uses: subosito/flutter-action@v2
21542166
with:
@@ -2348,7 +2360,7 @@ jobs:
23482360
- name: Setup Node.js
23492361
uses: actions/setup-node@v6
23502362
with:
2351-
node-version: '20'
2363+
node-version: '22'
23522364
registry-url: 'https://registry.npmjs.org'
23532365

23542366
- name: Setup Rust

Cargo.lock

Lines changed: 16 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,13 @@ storekey = "0.11"
191191
moka = { version = "0.12.15", features = ["future", "sync"] }
192192
ntest = "0.9.5"
193193
ipnet = "2.11.0"
194-
wasm-bindgen = { version = "0.2.114" }
195-
wasm-bindgen-futures = { version = "0.4.64" }
196-
js-sys = { version = "0.3.91" }
194+
wasm-bindgen = { version = "0.2.115" }
195+
wasm-bindgen-futures = { version = "0.4.65" }
196+
js-sys = { version = "0.3.92" }
197197
libc = "0.2.183"
198-
web-sys = { version = "0.3.91" }
199-
tsify-next = { version = "0.5", default-features = false, features = ["js"] }
200-
serde-wasm-bindgen = "0.6"
198+
web-sys = { version = "0.3.92" }
199+
tsify-next = { version = "0.5.6", default-features = false, features = ["js"] }
200+
serde-wasm-bindgen = "0.6.5"
201201
flate2 = "1.1.9"
202202
tar = "0.4"
203203
zip = { version = "8.2.0", default-features = false, features = ["deflate"] }

0 commit comments

Comments
 (0)