Closed Matthiaas closed 2 years ago
This error comes from using the old compiler version, which is not supporting the 2021 Rust version. It is already updated in the newest rust-optimizer, but you are using the older 0.11.3
version, while the newest one is 0.12.6
(https://hub.docker.com/r/cosmwasm/rust-optimizer/tags). Switching to: $ docker run --rm -v "$(pwd)":/code --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry cosmwasm/rust-optimizer:0.12.6
should help (I don't remember if anything changes in terms of arguments, but don't think so). It is also how it is stated in README.md. Please let me know if it helps so I can close the issue if so (unless you see some place when still old version is pointed out, then please let me know where it is to correct the docs).
Thank you so much!
Yes, this getting-started guide still point to the old version: https://docs.cosmwasm.com/docs/0.14/getting-started/compile-contract/
Hey, I am trying to optimize my smart contact, but couldn't get behind some errors the rust-optimizer returns.
When I run rust-optimizer in the root folder of a clean copy of https://github.com/InterWasm/cw-template I get these errors:
$ docker run --rm -v "$(pwd)":/code --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry cosmwasm/rust-optimizer:0.11.3
I tried changing rustup default to stable and nightly, but neither worked.
Would be greate if someone knows how to fix this or has any hints.
Cheers, Matthiaas.