This chapter will guide you how to install the software required for developing smart contracts using the Oasis SDK. After successfully completing all the described steps you will be able to start building your first smart contract on Oasis!
If you already have everything set up, feel free to skip to the next chapter.
The following is a list of prerequisites required to start developing using the Oasis SDK:
rustup cannot be installed alongside a distribution packaged Rust version. You will need to remove it (if it's present) before you can start using rustup.
Install it by running:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
If you want to avoid directly executing a shell script fetched the
internet, you can also download
rustup-init executable for your platform
and run it manually.
This will run
rustup-init which will download and install the latest stable
version of Rust on your system.
Rust Toolchain Version
The version of the Rust toolchain we use in the Oasis SDK is specified in the
The rustup-installed versions of
rustc and other tools will
automatically detect this file and use the appropriate version of the Rust
toolchain. When you are building applications that
use the SDK, it is recommended that you copy the same
file to your project's top-level directory as well.
To install the appropriate version of the Rust toolchain, make sure you are in the project directory and run:
This will automatically install the appropriate Rust toolchain (if not present) and output something similar to:
nightly-2022-08-22-x86_64-unknown-linux-gnu (overridden by '/code/rust-toolchain')
rustc 1.65.0-nightly (c0941dfb5 2022-08-21)
Required if you want to use the Go Client SDK.
At least version 1.20.2 is required. If your distribution provides a new-enough version of Go, just use that.
install the Go version provided by your distribution,
install the desired version of Go, e.g. 1.20.5, with2
go get golang.org/dl/go1.20.2