CosmWasm / optimizer

Dockerfile and script to deterministically produce the smallest possible Wasm for your Rust contract
Apache License 2.0
118 stars 57 forks source link

Failed compile wasm file on M1. #121

Open vladilen11 opened 1 year ago

vladilen11 commented 1 year ago

log

$ 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/workspace-optimizer:0.12.6
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
1.60.0-x86_64-unknown-linux-musl (default)
cargo 1.60.0 (d1fd9fe2c 2022-03-01)
Building artifacts in workspace ...
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { inner: ErrorInner { kind: Custom, line: None, col: 0, message: "missing field `workspace`", key: [] } }', src/main.rs:35:55
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
webmaster128 commented 1 year ago

Sounds like you use workspace-optimizer on a project that is not a workspace but a simple Rust project. You cn try cosmwasm/rust-optimizer for that.

The error message could be better though