Welcome to the Rust Mastery Course, an interactive, hands-on learning platform designed to take you from a complete Rust newbie to an advanced systems programmer. Whether you want to conquer the borrow checker, understand lifetimes, or master unsafe Rust and procedural macros, this platform provides bite-sized, interactive lessons to get you there.
You can dive into the curriculum online for free, or you can run it locally on your own machine. Even better, because the entire platform is open source, you can use our built-in AI tools to generate and teach your very own custom Rust courses!
Running the platform locally allows you to learn offline, experiment with the exercises, and author your own content.
- Rust: Install Rust
- wasm32 target:
rustup target add wasm32-unknown-unknown - Trunk:
cargo install --locked trunk
- Clone the repository:
git clone https://github.com/codeitlikemiley/crustacean.git cd crustacean - Run the development server:
trunk serve
- Open
http://localhost:3001in your browser.
Navigate the platform efficiently using these shortcuts without taking your hands off the keyboard:
- Cmd/Ctrl + K: Open/Close Command Palette
- Escape: Close Command Palette
- ArrowDown / j: Select Next Lesson
- ArrowUp / k: Select Previous Lesson
- Enter / l: Open Selected Lesson
- Cmd/Ctrl + Enter: Resume prioritized course
- Cmd/Ctrl + Enter: Run code / Advance to next step
- Cmd/Ctrl + ]: Next step
- Cmd/Ctrl + [: Previous step
- Cmd/Ctrl + Shift + {: Return to Catalog
- Cmd/Ctrl + Shift + X: Clear diagnostics
- Ctrl + n / p: Next / Previous step (macOS/Legacy)
- Ctrl + j / k: Next / Previous step (Vim-like)
Want to teach a topic or create a custom curriculum? This project heavily utilizes AI-assisted content generation so you can build new courses in minutes. We provide a dedicated "Skill" (instruction set) located at skills/software-development/rust-tuts.md.
To quickly generate high-quality, validating Rust courses, you should rely on an AI agent (like Antigravity or a Gemini CLI) equipped with this skill:
-
Activate the Skill:
- Instruct your agent to read the skill file:
Please review the skill at skills/software-development/rust-tuts.md. - The agent will learn our exact data structure and our "frontend-only" validation philosophy.
- Instruct your agent to read the skill file:
-
Generate a Course:
- Ask the agent to generate a course on a specific topic (e.g., "Create a Deep Dive Focus course on Rust Atomics").
- The agent will automatically generate a new data file with balanced
ConceptandPracticelessons. - It will write custom regex/contains matching rules that act as our "compiler-less" validation engine.
-
Register the Course:
- Have the agent (or manually) expose the new module in
src/data/mod.rsandsrc/data/lesson_pool.rs. - Finally, add the
Coursestruct definition to theCOURSESarray insrc/data/courses.rs.
- Have the agent (or manually) expose the new module in
We welcome community contributions! If you've created a great lesson or course that you'd like to see added to the platform, please submit a Pull Request (PR) by following these simple steps:
- Fork & Clone: Fork this repository to your GitHub account and clone it locally.
- Create a Branch: Create a new branch for your lesson (e.g.,
git checkout -b feature/add-my-lesson). - Build Your Lesson: Follow the "Creating Content" steps above.
- Test Locally: Run
trunk serveand ensure your lesson renders correctly, all exercises validate properly, and there are no compiler warnings. - Commit & Push: Commit your changes and push the branch to your fork.
- Open a PR: Open a Pull Request from your fork to our
masterbranch.
The app is deployed to GCP Cloud Run and accessible at masterustacean.goldcoders.dev.
We use a Makefile for streamlined operations. You can create a .env file to store your local GCP preferences without committing them to git.
.env example:
PROJECT_ID=your-project-id
GCP_ACCOUNT=your-email@example.com
REGION=us-central1The Makefile automatically runs gcloud config set before every GCP command to ensure you are always deploying to the correct account and project.
make build: Build the Docker image locally.make run: Run the container locally atlocalhost:8080.make ship: Push and Deploy in one command (automatically sets GCP context).make url: Show the URL of the deployed service.make open: Open the deployed service in your default browser.
Every push to the master branch triggers a rebuild and redeployment via GitHub Actions.
Required GitHub Secrets:
GCP_PROJECT_ID: Your GCP Project ID (e.g.,my-first-project).GCP_SA_KEY: A JSON Service Account Key with permissions for Cloud Build and Cloud Run.
If you're curious about how this platform was built, here is the underlying architecture:
- Frontend: Leptos 0.8 (Client-Side Rendering)
- Styling: Tailwind CSS
- Bundler: Trunk
- Deployment: Google Cloud Run + GitHub Actions
- Optimization: Multi-stage Docker builds with
cargo-chef