1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

rename egui_wasm to egui_web

This commit is contained in:
Emil Ernerfeldt
2020-07-17 11:05:57 +02:00
parent 520e42c11c
commit 8dced5896c
9 changed files with 11 additions and 11 deletions

27
build_web.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -eu
# Pre-requisites:
rustup target add wasm32-unknown-unknown
if ! [[ $(wasm-bindgen --version) ]]; then
cargo clean
cargo install -f wasm-bindgen-cli
cargo update
fi
# BUILD=debug
BUILD=release
# Clear output from old stuff:
rm -rf docs/*.wasm
echo "Build rust:"
cargo build --release -p example_wasm --target wasm32-unknown-unknown
echo "Generate JS bindings for wasm:"
FOLDER_NAME=${PWD##*/}
TARGET_NAME="example_wasm.wasm"
wasm-bindgen "target/wasm32-unknown-unknown/$BUILD/$TARGET_NAME" \
--out-dir docs --no-modules --no-typescript
open http://localhost:8888