build for both wasm and native
This commit is contained in:
parent
fbd187f3f7
commit
914d7c88c2
3 changed files with 4 additions and 4 deletions
4
justfile
4
justfile
|
@ -6,8 +6,8 @@ build: minify-js minify-rust minify-html
|
|||
cp front/style.css build/style.css
|
||||
|
||||
build-rust:
|
||||
cargo build --manifest-path pirates/Cargo.toml --target wasm32-unknown-unknown --release
|
||||
cp pirates/target/wasm32-unknown-unknown/release/pirates.wasm front/index.wasm
|
||||
cargo build --manifest-path pirates/Cargo.toml --target wasm32-unknown-unknown --features wasm --release
|
||||
cp target/wasm32-unknown-unknown/release/pirates.wasm front/index.wasm
|
||||
|
||||
minify-rust: build-rust build-dir
|
||||
wasm-strip front/index.wasm
|
||||
|
|
|
@ -12,7 +12,7 @@ lto = true
|
|||
opt-level = 's'
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
||||
[dependencies]
|
||||
keycode = "0.4.0"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#[cfg_attr(feature = "wasm", no_std)]
|
||||
#![cfg_attr(feature = "wasm", no_std)]
|
||||
|
||||
#[cfg(feature = "wasm")]
|
||||
#[panic_handler]
|
||||
|
|
Loading…
Reference in a new issue