This guide will help you set up your environment for ink! and Wasm smart contract development in UOMI.
ℹ️ Note
Before proceeding, make sure your system meets the requirements for Rust development.
What is ink!?
ink! is a Rust-based eDSL (embedded Domain Specific Language) developed by Parity Technologies. It's specifically designed for creating smart contracts that work with Substrate's pallet-contracts.
Rather than creating a new programming language, ink! adapts Rust's capabilities for smart contract development.
💡 Tip
Want to learn more about why ink! is a great choice for smart contract development? Check out the detailed benefits here.
Why WebAssembly?
Curious about the choice of WebAssembly for smart contracts? Find comprehensive explanations here.
Setting Up Your Environment
1. Installing Rust and Cargo
Rust and Cargo are essential prerequisites for Wasm smart contract development.
Linux and macOS
# Download and installcurlhttps://sh.rustup.rs-sSf|sh# Configure environmentsource~/.cargo/env
Windows
Visit the Rust website and follow the Windows installation instructions.
2. Configuring Rust
Set up your Rust environment with these commands:
⚠️ Warning
Due to a bug in cargo-contract, building contracts with rust nightly 1.70.0 or higher will fail. It is advised to use rustc v1.69.0 or older until the issue is resolved from cargo-contract side. For better dev experience it is advised to create a rust-toolchain file in the root of your project directory with following values.