Skip to content

Commit

Permalink
Attempt to fix the WASM build
Browse files Browse the repository at this point in the history
  • Loading branch information
idanarye committed Dec 1, 2024
1 parent 78f8031 commit 3994b4f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ jobs:
cargo doc --verbose --all-features &&
echo "<meta http-equiv=refresh content=0;url=bevy_yoleck/index.html>" > target/doc/index.html &&
required_features=$(
(
cargo metadata --no-deps --format-version 1 \
| jq --arg target "example3d" '.packages[].targets[] | select(.kind == ["example"]) | .["required-features"][]' -r \
| tr '\n' ' '
| jq '.packages[].targets[] | select(.kind == ["example"]) | .["required-features"][]' -r \
echo bevy/webgl2
) | tr '\n' ' '
)
cargo build --examples --release --features "$required_features" --target wasm32-unknown-unknown --features bevy/webgl2 &&
cargo build --examples --release --features "$required_features" --target wasm32-unknown-unknown &&
for demowasm in $(cd target/wasm32-unknown-unknown/release/examples; ls *.wasm | grep -v -); do
wasm-bindgen target/wasm32-unknown-unknown/release/examples/$demowasm --out-dir target/doc/demos/ --target web
cat > target/doc/demos/${demowasm%.*}.html <<EOF
Expand Down

0 comments on commit 3994b4f

Please sign in to comment.