Prepare a working environment
To get the most out of this workshop, you'll want to have a working development environment. To make sure you have everything you need, review this preflight checklist. If you discover something's missing, click the corresponding link.
You can complete this workshop without setting up a local working environment if you use the Substrate Playground. However, if you use the Substrate Playground, the changes you make aren't saved when you end a session. If you use Substrate Playground, you can skip this checklist and go directly to Get oriented, but be sure to save copies of the files you edit!
The instructions in the workshop assume you are working in a local environment.
Supported operating system
To set up a local development environment, you must have one of the following supported operating systems:
- Linux distribution
- Windows Subsystem for Linux
Rust programming language and toolchain
Substrate is built using Rust, a modern type sound programming language. The Rust compiler minimizes the chances of errors getting into your code and produces binaries that run on most operating systems and WebAssembly targets.
Rust is installed locally or available in the browser using the Substrate playground.
If you aren't sure, open a terminal and run
rustup show. If Rust isn't installed on your computer, follow the instructions in Install for your operating system. The last step in the installation instructions is to verify that the default node template compiles.
- Substrate node compiles locally or is available in the browser using the Substrate playground.
If you're new to Rust, keep in mind that this workshop isn’t about learning Rust. However, for a brief introduction to a few important concepts, see Detour: Learn Rust for Substrate.
You'll need an editor for modifying files. Ideally, you should select an integrated development environment (IDE) that provides syntax highlighting, automated code completion, and debugging features. If you don't have a preferred IDE, Visual Studio Code is a good choice.
To interact with the blockchain and test your work as you build the Substrate collectibles application, you'll need a browser-based application that can connect to the Substrate node. For the workshop, you can connect to the node from the Polkadot/Substrate Portal if you have Chrome or a Chromium-based browser.
- Google Chrome or a Chromium-based browser, such as Brave, Microsoft Edge, Opera, or Vivaldi.
If you use a more restrictive browser—such as Firefox—you might find that connections between the Polkadot/Substrate Portal and the node are blocked for security or privacy reasons.
If your browser blocks connections, clone the polkadot-js/apps repository and run it locally. For help setting up the Polkadot/Substrate Portal to run locally, see Detour: Set up Polkadot/Substrate Portal.
To make Substrate collectibles a user-facing application, you'll want tools for building at least a rudimentary user interface.
- Node.js and the package manager
- Yarn package manager
- Basic UI/UX framework, such as React, Vue, Bootstrap, or Angular.
For help selecting front-end libraries see Detour: Select front-end tools.
To complete the workshop, you must have access to a Substrate node. If you are setting up a local development environment, you can download and compile the Developer Hub substrate-node-template as described in the Quick start.
substrate-node-template repository provides is a snapshot of the main Substrate
node-template binary and includes everything you need to get started with a functional node and a core set of features.