In this section we will set up a development environment for building smart contracts.
Ensure that the rust installer is available.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Ensure the stable toolchain is the default.
rustup default stable
Add the wasm32
target.
rustup target add wasm32-unknown-unknown
Install the cargo-generate
crate.
cargo install cargo-generate --features vendored-openssl
Every so often, the Rust toolchain should be updated
# check for updates
rustup check
# update
rustup update stable
An IDE is recommended to help learn syntax, especially when just starting out with Rust.
There are two recommended editors for smart contract development.
Neither is better or worse than the other. Choose based on personal preference.
To generate a smart contract project using a template, proceed to the Project section.