| Crates.io | rust-tour |
| lib.rs | rust-tour |
| version | 0.1.17 |
| created_at | 2025-07-27 14:34:22.361466+00 |
| updated_at | 2025-08-23 02:28:43.925952+00 |
| description | Interactive web-based Rust tutorial with exercises, progress tracking, and integrated terminal |
| homepage | https://github.com/ghanithan/rust-tour |
| repository | https://github.com/ghanithan/rust-tour |
| max_upload_size | |
| id | 1770132 |
| size | 4,706,404 |

An interactive Rust learning platform featuring progressive exercises aligned with "The Rust Programming Language" book.
Rust Tour is a comprehensive learning platform that combines theoretical knowledge from the official Rust Book with hands-on coding exercises. It provides a structured pathway for developers to master Rust through progressive, test-driven exercises.
🚀 Get Started → Jump to Installation Methods | ⚡ Quick Install → Download Binary
GitHub Codespaces provides the ideal environment for learning Rust - eliminating setup friction so you can focus entirely on mastering the language. Here's why we strongly advocate for using Codespaces:
GitHub Free Personal Accounts include:
For context: 60 hours per month is more than sufficient for:
We are not sponsored by or affiliated with GitHub in any way. This recommendation comes purely from our commitment to reducing barriers to learning Rust. After extensive testing of various development environments, GitHub Codespaces consistently provides the smoothest onboarding experience for new Rust developers. Our goal is simple: help you start writing Rust code as quickly as possible, with minimal friction.
With Progress Tracking (Recommended):
./scripts/welcome.sh
http://localhost:3000 if running locallyWithout Progress Tracking:
./scripts/welcome.sh
Using Docker Compose (Recommended):
Clone the repository:
git clone https://github.com/ghanithan/rust-tour.git
cd rust-tour
Start with Docker Compose:
docker-compose up -d
Access the application at http://localhost:3000
Stop the application:
docker-compose down
Using Docker directly:
# Build and run
docker build -t rust-tour .
docker run -d \
--name rust-tour \
-p 3000:3000 \
-v $(pwd)/progress:/app/progress \
rust-tour
# Management commands
docker logs rust-tour
docker stop rust-tour && docker rm rust-tour
Using Pre-built Images from GitHub Container Registry:
For stable releases (recommended for production):
# Docker Compose with latest stable release
docker-compose -f docker-compose.ghcr.yml up -d
# Or direct Docker run
docker run -d \
--name rust-tour \
-p 3000:3000 \
-v $(pwd)/progress:/app/progress \
ghcr.io/ghanithan/rust-tour:latest
For development/testing with latest main branch:
# Use latest development build from main branch
docker run -d \
--name rust-tour-dev \
-p 3000:3000 \
-v $(pwd)/progress:/app/progress \
ghcr.io/ghanithan/rust-tour:main-latest
Available image tags:
Production Tags (stable releases):
latest - Latest stable release with embedded assets (production-optimized)v0.1.0 - Specific version releases with embedded assets (production-optimized)0.1 - Latest patch in minor version series with embedded assets0 - Latest minor in major version series with embedded assetsDevelopment Tags (main branch):
main-latest - Latest development build from main branch (fast builds, separate web files)main-abc123 - Specific commit from main branch for traceabilityBuild Differences:
latest, version tags): Built with Dockerfile.prod, full optimization, embedded assetsmain-latest, main-*): Built with Dockerfile, fast compilation, separate web files for debuggingFor Development:
# Use the development Docker setup with hot reload
docker-compose -f docker-compose.dev.yml up
# This provides:
# - Live code reloading
# - Development tools (cargo-watch, etc.)
# - Both Rust server (3000) and Vite dev server (5173)
Download pre-built binaries for your platform - no Rust toolchain required!
# Download the latest release for macOS (Apple Silicon)
curl -L https://github.com/ghanithan/rust-tour/releases/latest/download/rust-tour-aarch64-apple-darwin.tar.gz -o rust-tour.tar.gz
# Extract the binary
tar -xzf rust-tour.tar.gz
# Make it executable and move to a directory in your PATH
chmod +x rust-tour
sudo mv rust-tour /usr/local/bin/
# Verify installation
rust-tour --version
# Start learning!
rust-tour
# Download the latest release for Linux (x86_64)
wget https://github.com/ghanithan/rust-tour/releases/latest/download/rust-tour-x86_64-unknown-linux-gnu.tar.gz
# Extract the binary
tar -xzf rust-tour-x86_64-unknown-linux-gnu.tar.gz
# Make it executable and move to a directory in your PATH
chmod +x rust-tour
sudo mv rust-tour /usr/local/bin/
# Verify installation
rust-tour --version
# Start learning!
rust-tour
Alternative without sudo:
# Extract to your home directory
mkdir -p ~/.local/bin
tar -xzf rust-tour-x86_64-unknown-linux-gnu.tar.gz -C ~/.local/bin/
chmod +x ~/.local/bin/rust-tour
# Add to PATH if not already there
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Start learning!
rust-tour
Option 1: PowerShell (Recommended)
# Download the latest release for Windows
Invoke-WebRequest -Uri "https://github.com/ghanithan/rust-tour/releases/latest/download/rust-tour-x86_64-pc-windows-msvc.zip" -OutFile "rust-tour.zip"
# Extract the archive
Expand-Archive -Path "rust-tour.zip" -DestinationPath "."
# Move to a directory in your PATH (e.g., C:\Windows\System32 or create a custom directory)
# Option A: System-wide (requires admin)
Move-Item -Path "rust-tour.exe" -Destination "C:\Windows\System32\rust-tour.exe"
# Option B: User directory (no admin required)
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\bin"
Move-Item -Path "rust-tour.exe" -Destination "$env:USERPROFILE\bin\rust-tour.exe"
# Add to PATH: Settings → System → About → Advanced system settings → Environment Variables
# Add %USERPROFILE%\bin to your user PATH variable
# Verify installation
rust-tour --version
# Start learning!
rust-tour
Option 2: Manual Download
rust-tour-x86_64-pc-windows-msvc.ziprust-tour.exe to a directory in your PATHrust-tourAfter installing the binary, on first run:
~/rust-tour-exercises)All platforms support these options:
rust-tour --help # Show help and available options
rust-tour --port 8080 # Use a custom port
rust-tour --exercises-path /path # Use exercises from a specific location
If you already have Rust installed, you can use cargo for automatic updates:
# Install Rust Tour
cargo install rust-tour
# Start learning
rust-tour
First-time setup:
~/rust-tour-exercises)What happens on first run:
http://localhost:3000Subsequent runs:
Command-line options:
rust-tour --help # Show help and available options
rust-tour --port 8080 # Use a custom port
rust-tour --exercises-path /path # Use exercises from a specific location
For using the pre-built application:
git clone https://github.com/ghanithan/rust-tour.git
cd rust-tour
./scripts/welcome.sh
http://localhost:3000For development and customization:
Prerequisites:
Clone and setup:
git clone https://github.com/ghanithan/rust-tour.git
cd rust-tour
./scripts/run.sh setup
Start development servers:
./scripts/run.sh dev
This starts both the Rust server and web development server with hot reloading.
Each exercise is a standalone Cargo project located in the exercises/ directory:
exercises/
├── ch01_getting_started/
│ ├── ex01_hello_world/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── metadata.json
│ │ ├── src/main.rs
│ │ ├── tests/unit_tests.rs
│ │ └── hints.md
│ └── ex02_hello_cargo/
└── ch02_guessing_game/
Navigate to any exercise directory and run tests:
# Navigate to specific exercise
cd exercises/ch01_getting_started/ex01_hello_world
# Run all tests for this exercise
cargo test
# Run tests with output displayed
cargo test -- --nocapture
# Run a specific test
cargo test test_hello_world_output
# Check your solution
cargo run
# Verify code quality
cargo clippy -- -D warnings
cargo fmt --check
# Run tests to validate your solution
cargo test
# Check code quality
cargo clippy -- -D warnings
cargo fmt --check
# Or manually compare with reference solution (if available)
diff src/main.rs ../../../solutions/ch01/ex01/main.rs
graph TB
subgraph "User Interface"
A[Web Browser] --> B[React Frontend]
B --> C[Monaco Editor]
B --> D[Progress Dashboard]
B --> E[Integrated Terminal]
end
subgraph "Backend Services"
F[Rust Web Server] --> G[Exercise Framework]
F --> H[Progress Tracker]
F --> I[Terminal Emulator]
G --> J[Test Runner]
G --> K[Solution Validator]
end
subgraph "Content Layer"
L[Exercise Repository]
M[Test Suites]
N[Reference Solutions]
O[Progress Storage]
end
B <--> F
E <--> I
G --> L
J --> M
K --> N
H <--> O
style A fill:#f9f,stroke:#333,stroke-width:2px
style F fill:#ff9,stroke:#333,stroke-width:2px
style L fill:#9ff,stroke:#333,stroke-width:2px
web/): TypeScript/React application providing the interactive learning environmentweb-server/): Rust-based backend handling API requests and terminal emulationexercise-framework/): Core logic for exercise validation and progress trackingexercises/): Structured learning content with tests and hintsscripts/): Automation tools for development and exercise managementThe curriculum follows "The Rust Programming Language" book structure:
Each chapter contains 6-12 exercises progressing from basic to advanced concepts. Currently 5 chapters (40 exercises, ~16 hours of content) are implemented:
# Run all exercise tests
./scripts/run.sh test
# Run framework tests
cargo test --workspace
# Run web tests (if in development mode)
cd web && npm test
# Test Docker build
docker build -t rust-tour-test .
# Build Docker image with automated script
./scripts/build-docker.sh
# Test the built image
./scripts/test-docker.sh
# Manual build and run
docker build -t rust-tour .
docker run -d \
--name rust-tour \
-p 3000:3000 \
-v $(pwd)/progress:/app/progress \
rust-tour
# Development with volume mounts
docker run -d \
--name rust-tour-dev \
-p 3000:3000 \
-v $(pwd)/exercises:/app/exercises:ro \
-v $(pwd)/progress:/app/progress \
rust-tour
# View container logs and management
docker logs -f rust-tour
docker exec -it rust-tour sh
docker stop rust-tour && docker rm rust-tour
# Manually create the structure
mkdir -p exercises/ch04_understanding_ownership/ex05_ownership_puzzle
cd exercises/ch04_understanding_ownership/ex05_ownership_puzzle
cargo init
# Add test structure
mkdir tests
touch tests/unit_tests.rs hints.md README.md metadata.json
We use an automated release process with AI-generated release notes:
Creating a Release:
0.1.0)patch, minor, major)Manual Release Steps (Alternative):
# Create and push a version tag
git tag v0.1.0
git push origin v0.1.0
# This automatically triggers the release workflow
# Docker images will be built and published to GHCR
Release Artifacts:
ghcr.io/ghanithan/rust-tour:latest (production)ghcr.io/ghanithan/rust-tour:v0.1.0 (specific version)ghcr.io/ghanithan/rust-tour:0.1 (minor series)ghcr.io/ghanithan/rust-tour:0 (major series)ghcr.io/ghanithan/rust-tour:main-latest (development)All contributions must pass:
# Rust formatting
cargo fmt --all -- --check
# Rust linting
cargo clippy --all-targets --all-features -- -D warnings
# JavaScript/TypeScript
cd web && npm run lint
# Docker build test
docker build -t rust-tour-test .
We welcome contributions from the community. Please read our Contributing Guide for details on:
This project is licensed under the MIT License - see the LICENSE file for details.
The MIT License is one of the most permissive licenses, allowing you to use, modify, and distribute this software freely for any purpose, including commercial use.
For comprehensive guides, tutorials, and detailed documentation, visit our Wiki which includes:
Ready to begin your Rust journey? Start with Chapter 1 or jump to any topic that interests you!