Skip to content

Commit 40c3589

Browse files
abcxffMasterPtato
authored andcommitted
fix(wasm): point wasm-pack build to new wasm-bindgen repo
1 parent eaa41b2 commit 40c3589

4 files changed

Lines changed: 62 additions & 54 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 36 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -217,42 +217,42 @@ jobs:
217217
if-no-files-found: error
218218

219219
# ---------------------------------------------------------------------------
220-
# build-wasm — wasm package artifact built in parallel with native artifacts
220+
# build-wasm — disabled
221221
# ---------------------------------------------------------------------------
222-
build-wasm:
223-
needs: [context]
224-
name: "Build rivetkit-wasm"
225-
runs-on: depot-ubuntu-24.04-8
226-
permissions:
227-
contents: read
228-
steps:
229-
- uses: actions/checkout@v4
230-
with:
231-
lfs: ${{ needs.context.outputs.trigger == 'release' }}
232-
- run: corepack enable
233-
- uses: actions/setup-node@v4
234-
with:
235-
node-version: "22"
236-
cache: pnpm
237-
- uses: actions-rust-lang/setup-rust-toolchain@v1
238-
with:
239-
toolchain: stable
240-
target: wasm32-unknown-unknown
241-
rustflags: ""
242-
- uses: Swatinem/rust-cache@v2
243-
with:
244-
shared-key: "rivetkit-wasm-publish"
245-
cache-on-failure: true
246-
- name: Install wasm package dependencies
247-
run: pnpm install --frozen-lockfile --filter=@rivetkit/rivetkit-wasm
248-
- name: Build wasm package
249-
run: pnpm --filter=@rivetkit/rivetkit-wasm build
250-
- name: Upload wasm package artifact
251-
uses: actions/upload-artifact@v4
252-
with:
253-
name: wasm-package
254-
path: rivetkit-typescript/packages/rivetkit-wasm/pkg
255-
if-no-files-found: error
222+
# build-wasm:
223+
# needs: [context]
224+
# name: "Build rivetkit-wasm"
225+
# runs-on: depot-ubuntu-24.04-8
226+
# permissions:
227+
# contents: read
228+
# steps:
229+
# - uses: actions/checkout@v4
230+
# with:
231+
# lfs: ${{ needs.context.outputs.trigger == 'release' }}
232+
# - run: corepack enable
233+
# - uses: actions/setup-node@v4
234+
# with:
235+
# node-version: "22"
236+
# cache: pnpm
237+
# - uses: actions-rust-lang/setup-rust-toolchain@v1
238+
# with:
239+
# toolchain: stable
240+
# target: wasm32-unknown-unknown
241+
# rustflags: ""
242+
# - uses: Swatinem/rust-cache@v2
243+
# with:
244+
# shared-key: "rivetkit-wasm-publish"
245+
# cache-on-failure: true
246+
# - name: Install wasm package dependencies
247+
# run: pnpm install --frozen-lockfile --filter=@rivetkit/rivetkit-wasm
248+
# - name: Build wasm package
249+
# run: pnpm --filter=@rivetkit/rivetkit-wasm build
250+
# - name: Upload wasm package artifact
251+
# uses: actions/upload-artifact@v4
252+
# with:
253+
# name: wasm-package
254+
# path: rivetkit-typescript/packages/rivetkit-wasm/pkg
255+
# if-no-files-found: error
256256

257257
# ---------------------------------------------------------------------------
258258
# docker-images — per-arch runtime images pushed to Docker Hub
@@ -319,12 +319,11 @@ jobs:
319319
# publish — npm publish + R2 upload + Docker manifest + release tail
320320
# ---------------------------------------------------------------------------
321321
publish:
322-
needs: [context, build, build-wasm, docker-images]
322+
needs: [context, build, docker-images]
323323
name: "Publish"
324324
if: |
325325
!cancelled() &&
326326
needs.build.result == 'success' &&
327-
needs.build-wasm.result == 'success' &&
328327
needs.docker-images.result == 'success'
329328
runs-on: depot-ubuntu-24.04-8
330329
permissions:
@@ -364,17 +363,6 @@ jobs:
364363
path: engine-artifacts
365364
pattern: engine-*
366365
merge-multiple: true
367-
- name: Download wasm package artifact
368-
uses: actions/download-artifact@v4
369-
with:
370-
name: wasm-package
371-
path: rivetkit-typescript/packages/rivetkit-wasm/pkg
372-
- name: Validate wasm package artifact
373-
run: |
374-
test -f rivetkit-typescript/packages/rivetkit-wasm/pkg/rivetkit_wasm.js
375-
test -f rivetkit-typescript/packages/rivetkit-wasm/pkg/rivetkit_wasm.d.ts
376-
test -f rivetkit-typescript/packages/rivetkit-wasm/pkg/rivetkit_wasm_bg.wasm
377-
378366
- name: Place native binaries in platform packages
379367
run: |
380368
NATIVE_DIR=rivetkit-typescript/packages/rivetkit-napi

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@
5555
"@codemirror/view": "6.38.2",
5656
"@codemirror/autocomplete": "6.18.7",
5757
"@codemirror/commands": "6.8.1",
58-
"@codemirror/lint": "6.8.5",
59-
"wasm-pack": "=0.13.1"
58+
"@codemirror/lint": "6.8.5"
59+
},
60+
"patchedDependencies": {
61+
"wasm-pack@0.14.0": "patches/wasm-pack@0.14.0.patch"
6062
}
6163
}
62-
}
64+
}

patches/wasm-pack@0.14.0.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/binary.js b/binary.js
2+
index 7f0472a1f80325d4b75860f0ec9f784779a90c01..f9d1fae49b5bb6dd6baa1a8e268c8aa930fe299a 100644
3+
--- a/binary.js
4+
+++ b/binary.js
5+
@@ -31,7 +31,7 @@ const getPlatform = () => {
6+
const getBinary = () => {
7+
const platform = getPlatform();
8+
const version = require("./package.json").version;
9+
- const author = "drager";
10+
+ const author = "wasm-bindgen";
11+
const name = "wasm-pack";
12+
const url = `https://github.com/${author}/${name}/releases/download/v${version}/${name}-v${version}-${platform}.tar.gz`;
13+
return new Binary(platform === windows ? "wasm-pack.exe" : "wasm-pack", url, {

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)