πŸ“š
Open Polkadot Bootcamp
  • πŸ“š About the Bootcamp
    • πŸ“– Additional Resources
    • πŸ‘ Ask For Support
  • πŸ“– Curriculum
  • πŸ“•Rust Programming Language
    • Basic Rust
      • Introduction to Rust
        • πŸ§‘β€πŸ’» Excercises
      • Common Programming Concepts
        • πŸ§‘β€πŸ’» Excercises
      • Program Life Cycle
        • πŸ§‘β€πŸ’» Excercises
      • Ownership & Borrow Checker
      • Common Data Structures
    • Advanced Rust
      • Generic types, Trait extension and Advanced types
      • Lifetime Notation
      • Smart pointers & Macros
      • Common design patterns in Rust
      • Package management & How to structure your Rust project
      • Overview of the Rust ecosystem
  • πŸ“˜Building a blockchain with Polkadot SDK
    • Polkadot
      • Additional Reads
        • Why do you want to build a blockchain on Polkadot?
        • Understanding the sharded network design of Polkadot
      • Development on Polkadot
    • Polkadot SDK
      • Substrate
        • Create a new blockchain
          • πŸ§‘β€πŸ’» Exercise: Clone the minimal template
          • Understanding the architecture
          • Break down the node architecture
          • Introducing to Pop CLI tool
        • Adding a custom logic to runtime
          • πŸ§‘β€πŸ’» Exercise: Rust State Machine
          • Components of a Pallet
          • Hooks
          • Weights & Benchmarking
          • Extensions
            • Signed Extensions
            • Transaction Extensions
        • Common runtime modules
          • πŸ“•Example: System Pallet
          • πŸ“•Example: Contracts Pallet
          • πŸ“•Example: Assets Pallet
          • πŸ“•Example: Utility Pallet
        • Runtime API and RPC
        • Runtime upgrade
        • Bump Polkadot SDK versions
      • Cumulus
        • Introduction to Cumulus
          • Parachain from scratch
          • πŸ§‘β€πŸ’» Exercise: Build a parachain from scratch
        • Running a local relaychain network
          • Register & reserve a parachain
          • Launch the network & run a collator node
          • Launch the network with Pop CLI
        • Agile Coretime
    • Polkadot Hub
  • πŸ“’Smart Contract Development
    • Introduction
      • Introduction to PolkaVM
      • Getting started with Solidity development
      • Solidity File Structure
      • Contract Structure
    • Basic Solidity
      • Value types
      • Reference Types
      • Mapping Types
      • Simple Storage
    • Advanced Solidity
      • Units
      • Global Variables
      • Expression and Control Structures
      • Advanced Storage
      • Contract Tests
      • Contracts
Powered by GitBook
On this page
  • About Rust programming language
  • Rust is not the best option for everything.
  • When not to use Rust?
  • But with blockchain, it is. Let's learn about the role of Rust in the Polkadot development
  • Resources
  • OpenGuild Open Workshop Slide | Developing Rust Applications
  1. Rust Programming Language
  2. Basic Rust

Introduction to Rust

PreviousBasic RustNextπŸ§‘β€πŸ’» Excercises

Last updated 7 months ago

About Rust programming language

Rust is a systems programming language designed for performance, reliability, and memory safety. It has become popular in the blockchain ecosystem, especially in projects like Polkadot, for its ability to handle high-performance, low-level operations while minimizing risks like memory leaks, race conditions, and other bugs common in lower-level languages. Here’s an overview of Rust and why it’s a powerful choice for blockchain projects:

  • Memory Safety without Garbage Collection: Rust ensures memory safety without needing a garbage collector, unlike languages like Java or Python. This is critical for blockchain applications, where predictable performance is essential.

  • Concurrency and Parallelism: Rust’s design makes it easier to write concurrent and parallel programs, which can improve the efficiency and throughput of blockchain nodes and other network components.

  • Performance: Rust performs similarly to C and C++, making it suitable for use in performance-sensitive environments like blockchain, where nodes often need to process large amounts of data quickly.

Rust is not the best option for everything.

When not to use Rust?

  • Developing user interface (lack of UI components, not flexible as scripting language like Javascript)

  • Don’t have a production-ready framework for Web, engine for Game yet.

  • Rust is fast, but is it better than React.js or Vue.js? NO

  • What is the most important part of Game development? Gaming assets, Game engine (There is no way Rust Bevy Engine is better than Unity or Unreal Engine)

But with blockchain, it is. Let's learn about the role of Rust in the Polkadot development

Polkadot is built using Substrate, a framework developed by Parity Technologies, which is written entirely in Rust. Rust’s features make it an ideal language for Substrate, providing high performance and reliability for Polkadot's complex functionality.

Resources

OpenGuild Open Workshop Slide | Developing Rust Applications

We will learn about Polkadot SDK when we reach the "Polkadot SDK development" module. For now, when you visit the Polkadot SDK at , you can obviously see that the SDK is built with 99% in Rust.

πŸ“•
https://github.com/paritytech/polkadot-sdk
Module 0.1 - Introduction to Rust
Logo
Rust Programming Languagerustlang
Finding all information about Rust
The Rust Programming Language - The Rust Programming Language
Learn Rust with the Rust Programming Language Book
Reason why Parity Technologies - company behinds Polkadot SDK - choose Rust as the primary language.
Logo
Developing Rust Applications
Logo