Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 182 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,183 @@
# Rust Bootcamp
# πŸ¦€ Rust Bootcamp

Learning rust to build substreams.
> **Learning Rust to build Substreams** πŸ“š

A comprehensive learning journey through Rust fundamentals, specifically focused on building the skills needed for substream development. This repository contains hands-on exercises, examples, and notes from the Edge & Node Rust bootcamp.

---

## πŸ“– Table of Contents

- [🎯 Overview](#-overview)
- [πŸ—‚οΈ Course Structure](#️-course-structure)
- [πŸš€ Getting Started](#-getting-started)
- [πŸ“ Learning Modules](#-learning-modules)
- [πŸ› οΈ Prerequisites](#️-prerequisites)
- [🀝 Contributing](#-contributing)
- [πŸ“„ License](#-license)

---

## 🎯 Overview

This bootcamp covers essential Rust concepts needed for blockchain development and substream creation. The curriculum is designed to take you from Rust basics to advanced concepts required for efficient data processing and blockchain indexing.

**Key Learning Objectives:**
- Master Rust fundamentals (ownership, borrowing, lifetimes)
- Understand error handling with `Result` types
- Work with traits and generics
- Apply Rust concepts to blockchain data processing
- Build foundational skills for substream development

---

## πŸ—‚οΈ Course Structure

The bootcamp is organized into progressive modules, each building upon the previous:

```
rust-bootcamp/
β”œβ”€β”€ 1-hello-world/ # πŸ‘‹ Basic Rust syntax and setup
β”œβ”€β”€ 2-car-function/ # πŸš— Functions and data structures
β”œβ”€β”€ 3-borrow-checker/ # πŸ”’ Ownership and borrowing concepts
β”œβ”€β”€ 4-rustlings/ # 🧩 Interactive Rust exercises
β”œβ”€β”€ 5-results/ # ⚑ Error handling with Result types
β”œβ”€β”€ 6-traits/ # 🎭 Traits and polymorphism
└── rust-practice/ # πŸ’ͺ Additional practice exercises
```

---

## πŸš€ Getting Started

### Installation

1. **Install Rust** (if not already installed):
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
```

2. **Clone this repository**:
```bash
git clone https://github.com/melotik/rust-bootcamp.git
cd rust-bootcamp
```

3. **Verify installation**:
```bash
rustc --version
cargo --version
```

### Running Examples

Navigate to any module directory and run the examples:

```bash
cd 1-hello-world
cargo run
```

---

## πŸ“ Learning Modules

### 1️⃣ Hello World
- **Focus**: Basic Rust syntax, project setup
- **Key Concepts**: `cargo`, `main()` function, printing
- **Duration**: 30 minutes

### 2️⃣ Car Function
- **Focus**: Functions, structs, and methods
- **Key Concepts**: Data modeling, implementation blocks
- **Duration**: 45 minutes

### 3️⃣ Borrow Checker
- **Focus**: Ownership, borrowing, and lifetimes
- **Key Concepts**: Memory safety, references, mutable/immutable borrows
- **Duration**: 1 hour

### 4️⃣ Rustlings
- **Focus**: Interactive exercises and problem-solving
- **Key Concepts**: Comprehensive Rust practice
- **Duration**: 2-3 hours

### 5️⃣ Results
- **Focus**: Error handling and control flow
- **Key Concepts**: `Result<T, E>`, `Option<T>`, pattern matching
- **Duration**: 1 hour

### 6️⃣ Traits
- **Focus**: Polymorphism and code reusability
- **Key Concepts**: Trait definitions, implementations, generics
- **Duration**: 1.5 hours

### πŸƒ Rust Practice
- **Focus**: Additional exercises and real-world applications
- **Key Concepts**: Applying learned concepts to practical problems
- **Duration**: Ongoing

---

## πŸ› οΈ Prerequisites

- **No prior Rust experience required** - this bootcamp starts from the basics
- Basic programming knowledge (any language)
- Familiarity with command line/terminal
- Understanding of basic programming concepts (variables, functions, loops)

**Recommended Background:**
- Interest in blockchain technology
- Basic understanding of data processing concepts
- Familiarity with Git/GitHub

---

## πŸŽ“ Learning Resources

### Official Documentation
- [Rust Book](https://doc.rust-lang.org/book/) - The definitive guide to Rust
- [Rust by Example](https://doc.rust-lang.org/rust-by-example/) - Learn by running examples
- [Rustlings](https://github.com/rust-lang/rustlings) - Interactive exercises

### Blockchain-Specific Resources
- [Substreams Documentation](https://substreams.streamingfast.io/)
- [Graph Protocol](https://thegraph.com/docs/)
- [Edge & Node](https://www.docs.edgeandnode.com/)

---

## 🀝 Contributing

This is a personal learning repository, but if you find errors or have suggestions for improvements:

1. Fork the repository
2. Create a feature branch (`git checkout -b improve-documentation`)
3. Commit your changes (`git commit -am 'Add better examples'`)
4. Push to the branch (`git push origin improve-documentation`)
5. Create a Pull Request

---

## πŸ“„ License

This project is for educational purposes. Feel free to use and modify for your own learning journey.

---

## πŸ™ Acknowledgments

- **Edge & Node** for providing the excellent Rust bootcamp curriculum
- **The Rust Community** for their outstanding documentation and learning resources
- **Substreams Team** for the motivation to learn Rust for blockchain development

---

<div align="center">

**Happy Learning! πŸ¦€βœ¨**

*Built with ❀️ for the blockchain developer community*

</div>