Skip to content

Commit 399cd61

Browse files
authored
move getrandom backend override to config.toml (#7983)
## Summary to compile the wasm target we need to override the getrandom backend to be unsupported. We were previously doing this in CI, but for local builds that override was not picked up. Signed-off-by: Onur Satici <onur@spiraldb.com>
1 parent bf1527e commit 399cd61

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/web.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ jobs:
5858
cache: "npm"
5959
cache-dependency-path: vortex-web/package-lock.json
6060
- run: npm ci
61-
- env:
62-
RUSTFLAGS: --cfg getrandom_backend="unsupported"
63-
run: npm run wasm
61+
- run: npm run wasm
6462
- run: npm run format:check
6563
- run: npm run lint
6664
- run: npm run typecheck
@@ -87,9 +85,7 @@ jobs:
8785
cache: "npm"
8886
cache-dependency-path: vortex-web/package-lock.json
8987
- run: npm ci
90-
- env:
91-
RUSTFLAGS: --cfg getrandom_backend="unsupported"
92-
run: npm run build
88+
- run: npm run build
9389
- name: Upload build artifact
9490
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
9591
with:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# vortex-array dependency tree pulls in rand 0.10 → getrandom 0.4, which requires an explicit
2+
# backend opt-in for wasm32-unknown-unknown. The "unsupported" backend compiles fine and
3+
# panics only if random values are actually requested at runtime — nothing in the explorer
4+
# codepath does that, so this matches the CI build exactly without taking on the heavier
5+
# `wasm_js` browser-RNG dep.
6+
[target.wasm32-unknown-unknown]
7+
rustflags = ['--cfg', 'getrandom_backend="unsupported"']

0 commit comments

Comments
 (0)