I'm getting the following error when compiling a rust ink! 4.0;

ERROR: Loading of original wasm failed

It's started happening to me after I rustup update and now my rustc versions are:

stable-aarch64-apple-darwin unchanged - rustc 1.70.0 (90c541806 2023-05-31)
nightly-aarch64-apple-darwin unchanged - rustc 1.72.0-nightly (37998ab50 2023-06-11)
1.64-aarch64-apple-darwin unchanged - rustc 1.64.0 (a55dd71d5 2022-09-19)

Thank you very much :)

2 Answers 2


It is a known issues: https://github.com/paritytech/cargo-contract/issues/1139 caused by https://github.com/rust-lang/rust/issues/109807


I worked around this issue by using rust 1.69 instead. Specifically I just added a rust-toolchain file with these contents:

channel = "1.69.0"
components = [ "rustfmt", "clippy", "rust-src" ]
targets = [ "wasm32-unknown-unknown" ]
profile = "minimal"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.