You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the rust-contract tool uses stable as Rust toolchain channel as it's hardcoded in the build_contract() function inside __init__.py.
This has always worked perfectly until Rust introduced a breaking change with the release 1.81, affecting the rscdk. This means that having an environment with an updated stable toolchain makes it impossible to compile correctly any contract.
Steps to reproduce
Install the latest nightly version of Rust (version >= 1.81.0)
Clone the rscdk repository and switch to an example contract folder
error[E0599]: no method named `unwrap` found for struct `PanicMessage` in the current scope
--> crates/chain/src/lib.rs:16:46
|
16 | let msg = format!("{:?}", info.message().unwrap().as_str().unwrap());
| ^^^^^^ method not found in `PanicMessage<'_>`
rust-contract doesn't force users to run the compilation with the stable toolchain, so that eventual future breaking changes could easily be fixed by switching to a different toolchain (which is impossible today)
Currently, the
rust-contracttool usesstableas Rust toolchain channel as it's hardcoded in thebuild_contract()function inside__init__.py.This has always worked perfectly until Rust introduced a breaking change with the release
1.81, affecting therscdk. This means that having an environment with an updatedstabletoolchain makes it impossible to compile correctly any contract.Steps to reproduce
1.81.0)rscdkrepository and switch to an example contract folderrust-contractThe compilation returns the following error:
Expected behavior
rust-contractcan build both with Rust1.81and older versions (this depends on fixing Cannot compile with Rustnightly-1.81.0rscdk#8)rust-contractdoesn't force users to run the compilation with thestabletoolchain, so that eventual future breaking changes could easily be fixed by switching to a different toolchain (which is impossible today)