-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
23 lines (18 loc) · 718 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
install:
cargo install wasm-bindgen-cli
build-wasm-websys:
cd todomvc-websys \
&& cargo build --release --target wasm32-unknown-unknown \
&& wasm-bindgen --target web --no-typescript --out-dir ../static/ --out-name wasm target/wasm32-unknown-unknown/release/todomvc.wasm
mv static/wasm_bg.wasm static/todomvc.wasm
mv static/wasm.js static/todomvc.js
build-wasm:
cd todomvc \
&& cargo web build --release --target wasm32-unknown-unknown
cp todomvc/target/wasm32-unknown-unknown/release/todomvc.js static/
cp todomvc/target/wasm32-unknown-unknown/release/todomvc.wasm static/
cp todomvc/static/index.html static/
run-websys: build-wasm-websys
cargo run --release
run: build-wasm
cargo run --release