Add wasm-opt to build

This commit is contained in:
durch
2022-10-06 15:16:14 +02:00
parent 25f1fb2eb8
commit be07e4997e
3 changed files with 14 additions and 1 deletions
+3
View File
@@ -104,6 +104,9 @@ fmt-connect:
wasm:
RUSTFLAGS='-C link-arg=-s' cargo build --manifest-path contracts/Cargo.toml --release --target wasm32-unknown-unknown
mixnet-opt: wasm
cd contracts/mixnet && make opt
generate-typescript:
cd tools/ts-rs-cli && cargo run && cd ../..
yarn types:lint:fix
+1 -1
View File
@@ -37,4 +37,4 @@ rand_chacha = "0.2"
crypto = { path = "../../common/crypto", features = ["asymmetric", "rand"] }
[build-dependencies]
vergen = { version = "5", default-features = false, features = ["build", "git", "rustc"] }
vergen = { version = "5", default-features = false, features = ["build", "git", "rustc"] }
+10
View File
@@ -8,6 +8,16 @@ This is the [cosmwasm](https://www.cosmwasm.com) smart contract which runs the N
RUSTFLAGS='-C link-arg=-s' cargo wasm
```
## Production build
Install wasm-opt:
```
npm i wasm-opt -g
```
Run `make mixnet-opt` from the top level Nym directory
## CI Support
We have template configurations for both [GitHub Actions](.github/workflows/Basic.yml)