Prepare a working environment
Please read Substrate to Polkadot SDK page first.
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.
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
- macOS
- 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.
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.
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.
Code editor
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.
Browser
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.
Front-end libraries
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
npm
- Yarn package manager
- TypeScript
- Basic UI/UX framework, such as React, Vue, Bootstrap, or Angular.
For help selecting front-end libraries see Detour: Select front-end tools.
Node template
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.
The 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.