diff --git a/Makefile b/Makefile index 8d85d2b5c5..51c143e921 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/contracts/mixnet/Cargo.toml b/contracts/mixnet/Cargo.toml index 237e9c38ca..c8428b5e28 100644 --- a/contracts/mixnet/Cargo.toml +++ b/contracts/mixnet/Cargo.toml @@ -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"] } \ No newline at end of file diff --git a/contracts/mixnet/README.md b/contracts/mixnet/README.md index a4ace81c19..e685426dc7 100644 --- a/contracts/mixnet/README.md +++ b/contracts/mixnet/README.md @@ -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)