Closed drewstaylor closed 1 year ago
This is not an issue in the Archway CLI but rather a limitation on the rust-optimizer workspace builder, which is not possible to overcome easily. You can still run the Binaryen optimizer manually to solve this problem, but if you do, I'd recommend running it on a Linux machine.
@aelesbao How do I run it manually? Do you know if there's an example somewhere?
You can find the example in the rust-optimizer script, but it's really straight forward:
WASM="target/wasm32-unknown-unknown/release/{contract_name}.wasm"
wasm-opt -Os "$WASM" -o "artifacts/$(basename $WASM)"
Previously (1.2.3) we were able to use BinaryEn directly for optimizing WASM.
Once that was reverted back to using the CosmWasm Docker container for
archway build --optimize
we lost the ability to use relative path to dependencies in Cargo.toml.Result: Developers with relative path dependencies need to optimize their WASM using an old version of Archway CLI (1.2.3), then use a recent version to store and deploy the contract on chain.
Note: You can still use a GitHub link to your dependencies; however, this will not work for developers with private repositories.
Suggestion: