mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 14:50:03 -04:00
Run wasm-bindgen in CI and update parking_lot (#1293)
* Run wasm-bindgen in CI * Update parking_lot 0.11 -> 0.12
This commit is contained in:
@@ -56,8 +56,12 @@ TARGET=`cargo metadata --format-version=1 | jq --raw-output .target_directory`
|
||||
|
||||
echo "Generating JS bindings for wasm…"
|
||||
TARGET_NAME="${CRATE_NAME}.wasm"
|
||||
wasm-bindgen "${TARGET}/wasm32-unknown-unknown/$BUILD/$TARGET_NAME" \
|
||||
--out-dir docs --no-modules --no-typescript
|
||||
WASM_PATH="${TARGET}/wasm32-unknown-unknown/$BUILD/$TARGET_NAME"
|
||||
wasm-bindgen ${WASM_PATH} --out-dir docs --no-modules --no-typescript
|
||||
|
||||
# if this fails with "error: cannot import from modules (`env`) with `--no-modules`", you can use:
|
||||
# wasm2wat target/wasm32-unknown-unknown/release/egui_demo_app.wasm | rg env
|
||||
# wasm2wat target/wasm32-unknown-unknown/release/egui_demo_app.wasm | rg "call .now\b" -B 20 # What calls `$now` (often a culprit)
|
||||
|
||||
# to get wasm-strip: apt/brew/dnf install wabt
|
||||
# wasm-strip docs/${CRATE_NAME}_bg.wasm
|
||||
|
||||
Reference in New Issue
Block a user