mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 03:18:06 +08:00
17 lines
628 B
Makefile
17 lines
628 B
Makefile
# https://just.systems
|
|
|
|
output := 'wasm'/'pkg'/'graphite_wasm_bg.wasm'
|
|
|
|
build profile='debug':
|
|
cargo build -p graphite-wasm --lib --target wasm32-unknown-unknown --color=always {{ if profile != "debug" { "--release" } else { "" } }}
|
|
|
|
mkdir -p pkg
|
|
|
|
wasm-bindgen \
|
|
{{ '..' / 'target' / 'wasm32-unknown-unknown' / if profile != "debug" { 'release' / 'graphite_wasm.wasm' } else { 'debug' / 'graphite_wasm.wasm' } }} \
|
|
--out-dir {{ 'wasm' / 'pkg' }} --typescript --target web {{ if profile == "debug" { "--debug" } else { "" } }}
|
|
|
|
{{ if profile != 'debug' { "wasm-opt " + output + " -o " + output + " -O" } else { "" } }}
|
|
|
|
|