From 92dde253446a6930f34f2fcf67f76bc11669ec3b Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 20 Apr 2023 10:18:15 +0200 Subject: [PATCH] Remove wasm_bindgen_check.sh --- .github/workflows/rust.yml | 12 ++++------ scripts/check.sh | 4 +--- scripts/wasm_bindgen_check.sh | 45 ----------------------------------- 3 files changed, 5 insertions(+), 56 deletions(-) delete mode 100755 scripts/wasm_bindgen_check.sh diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e404507d1..a365c4235 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -154,15 +154,11 @@ jobs: with: version: "0.2.84" - - run: ./scripts/wasm_bindgen_check.sh --skip-setup - - - run: ./scripts/clippy_wasm.sh - - name: Cranky wasm32 - uses: actions-rs/cargo@v1 - with: - command: cranky - args: --target wasm32-unknown-unknown --all-features -p egui_demo_app --lib -- -D warnings + run: ./scripts/clippy_wasm.sh + + - name: Build web demo + run: ./scripts/build_demo_web.sh # --------------------------------------------------------------------------- diff --git a/scripts/check.sh b/scripts/check.sh index f0491f0d2..e878504c7 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -51,9 +51,7 @@ cargo doc --document-private-items --no-deps --all-features (cd crates/emath && cargo check --all-features) (cd crates/epaint && cargo check --all-features) -./scripts/wasm_bindgen_check.sh - -cargo cranky --target wasm32-unknown-unknown --all-features -p egui_demo_app --lib -- -D warnings +./scripts/clippy_wasm.sh ./scripts/cargo_deny.sh diff --git a/scripts/wasm_bindgen_check.sh b/scripts/wasm_bindgen_check.sh deleted file mode 100755 index 18c24628e..000000000 --- a/scripts/wasm_bindgen_check.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -set -eu -script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) -cd "$script_path/.." - -if [[ $* == --skip-setup ]] -then - echo "Skipping setup_web.sh" -else - echo "Running setup_web.sh" - ./scripts/setup_web.sh -fi - -CRATE_NAME="egui_demo_app" -FEATURES="glow,http,persistence,web_screen_reader" - -# This is required to enable the web_sys clipboard API which eframe web uses -# https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html -# https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html -export RUSTFLAGS=--cfg=web_sys_unstable_apis - -echo "Building rust…" -BUILD=debug # debug builds are faster - -(cd crates/$CRATE_NAME && - cargo build \ - --lib \ - --target wasm32-unknown-unknown \ - --no-default-features \ - --features ${FEATURES} -) - -TARGET="target" - -echo "Generating JS bindings for wasm…" - -rm -f "${CRATE_NAME}_bg.wasm" # Remove old output (if any) - -TARGET_NAME="${CRATE_NAME}.wasm" -wasm-bindgen "${TARGET}/wasm32-unknown-unknown/$BUILD/$TARGET_NAME" \ - --out-dir . --no-modules --no-typescript - -# Remove output: -rm -f "${CRATE_NAME}_bg.wasm" -rm -f "${CRATE_NAME}.js"