Skip to content

Commit ed878a8

Browse files
authored
fix: docs build (#85)
* fix: docs build * fix: rustflags * fix: put it in the script * fix: check wasm on ci * fix: install wasm pack
1 parent bfba02f commit ed878a8

File tree

5 files changed

+14
-25
lines changed

5 files changed

+14
-25
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ jobs:
2020
uses: dtolnay/rust-toolchain@stable
2121
with:
2222
components: rustfmt, clippy
23+
- name: Install wasm-pack
24+
uses: jetli/[email protected]
25+
with:
26+
version: "latest"
2327
- uses: Swatinem/rust-cache@v2
2428
- uses: astral-sh/setup-uv@v3
2529
- name: Lint
@@ -28,3 +32,5 @@ jobs:
2832
run: scripts/test
2933
- name: CLI smoke test
3034
run: uv run cql2 < examples/text/example01.txt
35+
- name: Build WASM
36+
run: scripts/buildwasm

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install wasm-pack
2727
uses: jetli/[email protected]
2828
with:
29-
version: 'latest'
29+
version: "latest"
3030
- name: build wasm
3131
run: scripts/buildwasm
3232
- uses: astral-sh/setup-uv@v3

Cargo.lock

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

scripts/buildwasm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
set -e
44

5-
wasm-pack build --no-typescript --target web --out-dir ../docs/pkg wasm
5+
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' wasm-pack build --no-typescript --target web --out-dir ../docs/pkg wasm

wasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ crate-type = ["cdylib"]
1717
[dependencies]
1818
cql2 = { path = ".." }
1919
wasm-bindgen = "0.2"
20-
getrandom = { version = "0.2.15", features = ["js"] }
20+
getrandom = { version = "0.3.3", features = ["wasm_js"] }
2121

2222
[dependencies.web-sys]
2323
version = "0.3.4"

0 commit comments

Comments
 (0)