Skip to content

Latest commit

 

History

History
65 lines (41 loc) · 1.35 KB

03-getting-started.md

File metadata and controls

65 lines (41 loc) · 1.35 KB

Provenance Smart Contract Tutorial

Getting Started

In this section we will set up a development environment for building smart contracts.

Installation

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

Updates

Every so often, the Rust toolchain should be updated

# check for updates
rustup check
# update
rustup update stable

Setting up an IDE

An IDE is recommended to help learn syntax, especially when just starting out with Rust.

There are two recommended editors for smart contract development.

Visual Studio Code

Intellij IDEA

Neither is better or worse than the other. Choose based on personal preference.

Up Next

To generate a smart contract project using a template, proceed to the Project section.