cw-optimizoor

alt text

Build Status Latest version Documentation License

A blazingly fast alternative to [CosmWasm/rust-optimizer] for compiling & optimizing CW smart contracts.

It's primarily meant to speed up local development and testing.

Features:

Installation

sh $ cargo install cw-optimizoor

You might also need any of the following:

Linux

```sh

Ubuntu

$ sudo apt install -y cmake pkg-config libssl-dev clang

Fedora

$ sudo dnf install -y cmake openssl-devel clang ```

macOS

sh $ xcode-select --install # clang $ brew install cmake pkg-config

Windows

Usage

```sh $ cargo cw-optimizoor -h

USAGE: cargo cw-optimizoor [WORKSPACE_PATH]

ARGS: Path to the workspace dir or Cargo.toml ```

Example

```sh $ cargo cw-optimizoor # defaults to the current dir

cargo cw-optimizoor Cargo.toml # or this for pointing directly at a Cargo manifest

cargo cw-optimizoor . # or this for the current dir

🧐️ Compiling .../monorepo/Cargo.toml Finished release [optimized] target(s) in 0.10s

🤓 Intermediate checksums: ...326a37596ef54377869d8f7caa37cec393333b9808c9ecc75ddadf1357193a50 contract1.wasm ...170190ce817c36aa093263f4689abaffafe363909aea13e48b80c43a39a7cde9 contract2.wasm ...6a718777f28b2e213e3f18f60ffbf62febe563072e8a89b0cfa5359b3e0bed1b contract3.wasm ...9f9dae24e8a388730b40de3092117cf84476dacfb6ed0112bec53b1b21127333 contract4.wasm ...9255c18758fd0b27de38c8aacd2030167b9d3c1575374d811f89742be8af4f8b contract_5.wasm

🥸 Ahh I'm optimiziing ...✅ contract1 was optimized. ...⏭️ contract2 is unchanged. Skipping. ...✅ contract3 was optimized. ...⏭️ contract4 is unchanged. Skipping. ...✅ contract_5 was optimized.

🤓 Final checksums: ...e11db2d5b9ff3e14deee2a04ee40be0d1f8da96c4a45bc55348ea74ff4a4d4ae contract1-aarch64.wasm ...0565368394fd2fa1409909f63fe11d09f37a1f777f26bc5ddb65d17c2fc82bb9 contract2-aarch64.wasm ...1364e024dab8cc057d090d8686042d8ab5e41e810b16d464be71a24aedc79ad3 contract3-aarch64.wasm ...4f553da8e620137c194eddfddcaa7baa29239ec723d0b1b2b49d11fe625986e5 contract4-aarch64.wasm ...61ea8988f4275c15785d7496c453a37ae4c3b021d4521120fc5c0d532287f864 contract_5-aarch64.wasm

🫡 Done. Saved optimized artifacts to: .../monorepo/artifacts ```