-
Notifications
You must be signed in to change notification settings - Fork 5k
Migrating Rust programs from v1.5 to v1.6
The v1.6 release line requires some minor changes to Rust program source that previously used v1.5.14 or earlier. These changes can be made with a ~v1.5.15 release as well, to prepare your program for the upgrade to v1.6.
As reference, https://github.com/solana-labs/example-helloworld/pull/158/files makes the necessary changes to the helloworld example
- Edit your Cargo.toml and remove the
tokio = { version = "0.3", features = ["macros"]}
from your[dev-dependencies]
. A compatible tokio can now be imported from program-test with ause solana_program_test::tokio;
statement.
Instruction::new()
is deprecated by Instruction::new_with_bincode()
. The function signatures are the same.
The v1.5.15 and newer Rust crates pin the version of dependent Solana Rust crates to the same version, to avoid accidental version mixing and build breakage during the non-atomic publish of new release crates to crates.io.
If your program is referencing v1.5.14 or earlier, bump the Solana version to v1.5.15 to take advantage of this version pinning.
- General
- Feature Gates
- Technical
- Schedule
- Testnet