From your first line of code to building real Web3 applications.

Why Rust to Mainnet?

One of the things I've noticed about learning Rust is that finding comprehensive learning resources that take you from the basics to building real-world applications can be difficult.

There are great resources for learning Rust itself, but when you start exploring backend engineering, blockchain development and smart contracts, the learning experience becomes more fragmented. You're constantly moving between documentation, tutorials, books and repositories, trying to connect the dots yourself.

That's what I want to address with Rust to Mainnet.

Who Is This Series For?

If you're someone who has always wanted to learn a programming language but doesn't know where to start, a developer currently working with other languages and looking to learn Rust, or just someone curious about programming in general, then this is for you.

This series is designed to start from the basics of programming, helping people with little to no programming experience understand what it's all about while equipping them with the Rust and engineering fundamentals needed to build backend and blockchain applications.

What Do You Need to Get Started?

You don't need any previous programming experience, knowledge of Rust, or understanding of blockchain technology to follow this series. We'll be learning everything from the ground up.

All the essential development tools and primary learning resources we'll be using are free.

Development Tools

  • A computer: A Windows, macOS or Linux machine. You don't need a high-end computer to get started.
  • Visual Studio Code: The code editor we'll be using throughout the series.
  • Rust and Cargo: The Rust programming language and its package manager and build system.
  • Rust Analyzer: A VS Code extension that makes writing Rust easier.
  • Git: A version control system for tracking changes to our code.
  • GitHub: Where we'll host our projects, share source code and collaborate.
  • A terminal: A tool for interacting with our computer through commands. It already comes with most operating systems.

Don't worry if you're unfamiliar with any of these tools. We'll go through what they do, why we need them and how to set them up in subsequent articles.

Learning Resources

While this series will provide explanations and practical examples, I encourage everyone to explore additional learning resources independently.

Here are some useful resources worth bookmarking:

Technologies We'll Explore Along the Way

As we progress into backend engineering and blockchain development, we'll introduce additional tools and technologies:

  • Actix Web — Backend and API development.
  • PostgreSQL — Relational database management.
  • SQLx — Interacting with databases using Rust.
  • Postman — Testing and interacting with APIs.
  • Redis — Caching and backend infrastructure.
  • Docker — Containerization and deployment.
  • Tokio — Asynchronous programming in Rust.
  • Solana — Blockchain and native Rust program development.
  • Anchor — A framework for developing Solana programs.

You don't need to install or understand any of these technologies just yet. We'll introduce each one when we understand the problem it solves and why we need it.

Beyond the Technical Requirements

Perhaps the most important requirements are curiosity, patience, consistency and a willingness to learn.

You're going to encounter errors, struggle with certain concepts and occasionally need to revisit previous articles. That's a normal part of learning software development.

Don't just read the articles. Write code, experiment with it, break things, ask questions and try to understand why something works.

The objective isn't to memorize code but to develop the ability to think, solve problems and build things independently.

What Will We Be Learning?

We'll be starting from the absolute basics of programming and gradually making our way into more advanced concepts.

The series is divided into nine major stages:

  1. Programming Fundamentals — Understanding computers, programming languages and writing our first Rust program.
  2. Core Rust — Understanding ownership, borrowing, lifetimes, structs, enums, traits and error handling.
  3. Advanced Rust — Exploring memory management, concurrency, multithreading and asynchronous programming.
  4. Backend Engineering Fundamentals — Understanding how the internet works, networking, HTTP, APIs and server architecture.
  5. Backend Development with Actix Web — Building APIs, working with databases, authentication, security and deployment.
  6. Blockchain Fundamentals — Understanding cryptography, digital signatures, wallets, transactions and how blockchains work.
  7. Blockchain Integration — Connecting our Wallet API to the Solana blockchain.
  8. Native Rust Smart Contracts — Writing Solana programs without relying on frameworks like Anchor.
  9. Anchor and Advanced Web3 Engineering — Understanding Anchor, smart contract security, testing and integrating on-chain programs with our backend.

One thing I want to emphasize throughout this series is understanding the fundamentals before introducing abstractions.

Before using Actix Web, we'll understand how web servers work and even attempt to build one ourselves. Before using Anchor, we'll write native Solana programs and understand the problems Anchor solves.

I've put together a comprehensive curriculum containing 160 planned articles, alongside learning resources that anyone can refer to throughout the series.

Rust to Mainnet — Complete Curriculum

What Are We Building?

Rather than learning individual concepts without knowing where to apply them, we'll be building an open-source Wallet API throughout the series.

We'll start with something as simple as a command-line application that simulates deposits, withdrawals and transfers.

As our understanding of Rust grows, so will the complexity of our project. We'll gradually introduce persistence, networking, APIs, databases, authentication, security and transaction management.

Eventually, we'll integrate our Wallet API with the Solana blockchain, allowing us to interact with wallets, retrieve balances, construct transactions and track their execution.

Once we've completed the backend, we'll move into writing our own native Solana programs before introducing Anchor and exploring more advanced blockchain concepts.

The source code will be publicly available in the Rust to Mainnet GitHub repository, allowing anyone to follow along, experiment, contribute or even use it as a foundation for their own projects.

Our blockchain experiments will initially take place on development networks, without putting real funds at risk.

What Should You Expect?

This isn't a crash course, and it isn't a series that promises to turn you into a Rust developer in a few days.

Some topics will be relatively simple, while others might require us to spend considerably more time understanding them. That's perfectly fine.

The aim is to understand why things work rather than simply knowing how to make them work.

Throughout the series, expect practical examples, technical explanations, exercises, project implementations and additional learning resources.

By the end of the series, you should have developed a solid foundation in:

  • Writing and understanding Rust code.
  • Reasoning about memory management and concurrency.
  • Designing, building and testing backend applications.
  • Working with databases and securing APIs.
  • Understanding blockchain architecture and transactions.
  • Writing and testing native Solana programs.
  • Developing smart contracts using Anchor.

However, reading the articles alone won't be enough. A significant part of learning software development comes from writing code yourself, encountering problems and figuring out how to solve them.

I encourage everyone following this series to experiment beyond the examples provided, ask questions, share their understanding and challenge explanations whenever something doesn't make sense.

The Beginning of Our Journey

My hope is that Rust to Mainnet becomes more than just a collection of articles. I want it to become a resource that people can discover, learn from and return to years from now, regardless of where they are in their development journey.

Whether you're writing your first line of code or exploring Rust after years of working with another programming language, I hope you'll find something valuable here.

In the next article, we'll start with a fundamental question:

What exactly is programming?

Before we write our first line of Rust, we need to understand what it actually means to program a computer.

Welcome to Rust to Mainnet.

Written by Dapper.

Follow me on X | GitHub | Rust to Mainnet Repository