Skip to content

Commit 0a6f20d

Browse files
committed
uhh
1 parent 80a7ba1 commit 0a6f20d

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,15 @@ jobs:
102102

103103
- name: Build WASM examples
104104
run: |
105-
for example in $WASM_EXAMPLES_LIST; do
106-
echo "Building WASM: $example"
107-
cd "$example"
108-
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' cargo build --target wasm32-unknown-unknown
109-
cd ..
110-
done
105+
# browser-echo is a single package
106+
cd browser-echo
107+
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' cargo build --target wasm32-unknown-unknown --lib
108+
cd ..
109+
110+
# browser-chat is a workspace, build only the browser-wasm package
111+
cd browser-chat
112+
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' cargo build --target wasm32-unknown-unknown -p chat-browser
113+
cd ..
111114
env:
112115
RUST_LOG: ${{ runner.debug && 'DEBUG' || 'INFO'}}
113116

browser-chat/cli/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ iroh = { workspace = true, default-features = false }
1010
n0-future = "0.3"
1111
rand = "0.9.2"
1212
chat-shared = { version = "0.1.0", path = "../shared" }
13-
tokio = { version = "1.43.0", features = ["rt-multi-thread", "macros", "io-std"] }
1413
tracing-subscriber = "0.3.19"
1514
data-encoding = "2.9"
15+
16+
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
17+
tokio = { version = "1.43.0", features = ["rt-multi-thread", "macros", "io-std"] }

0 commit comments

Comments
 (0)