Rust Version
Required Rust version
Starting with framework version v0.50.0, MultiversX smart contracts can be built using stable Rust.
Before this version, nightly Rust was required.
Recommended compiler versions
For everything after v0.50.0 we recommend running the latest stable version of Rust. Older versions have had compatibility issues with certain framework dependencies, on certain versions of the compiler.
Also, everything on versions older than v0.50.0 needs to run on nightly Rust.
| Application Version | Required Rust Channel | Version Requirements |
|---|---|---|
Prior to v0.50 | Nightly | nightly-2023-12-11 or nightly-2024-05-22 |
v0.50 to v0.56 | Stable (recommended) or Nightly | ≥1.78 and ≤1.86 |
v0.57 | Stable (recommended) or Nightly | ≥1.83 and ≤1.86 |
v0.58 and Higher | Stable (recommended) or Nightly | ≥1.83* |
* Starting with Rust version 1.89 and higher, there are known runtime issues when using wasmer 6.0 (wasmer-experimental) exclusively on the Linux platform.
If you are using wasmer 6.0 on Linux, we recommend pinning your Rust version below 1.89.
Why Nightly for the older versions?
There were several nightly features that the framework was using, which we had hoped to see stabilized sooner.
These are of little relevance to the average developer, but for the record, let's mention a few of them and how we managed to circumvent their usage:
never_type- avoided by using slightly different syntax;auto_traitsandnegative_impls- avoided by redesigning theCodecFrom/TypeAbiFromtrait systems;generic_const_exprs- replaced with massive amounts of macros;panic_info_message- replaced by a different method to retrieve the panic message.
If any of these get stabilized in the future, we might revert the changes enacted in v0.50.0.
It is in any case our commitment to keep the framework compatible with stable Rust from here on, no matter what.