This is the repository for the website: The Ray Tracing Road to Rust, a tutorial to help people learn Rust by building a ray tracer and comparing Rust with C++ using tabs interactively.
The tutorial is adapted from the awesome book: Ray Tracing in One Weekend by Peter Shirley, Trevor David Black, and Steve Hollasch.
The website is built with Nextra, Next.js, TypeScript, React, Tailwind CSS, Remark, and MDX.
Using Node.js's built-in pnpm:
corepack enable pnpm
Or installing pnpm as a global package:
npm install -g pnpm
pnpm install
pnpm dev
git submodule update --init --recursive
This will download the project starter templates in the templates
folder.
pnpm run export
This will export code from the tutorial to code/rust
and code/cpp
git repositories with full change history.
Generate images (small images only):
pnpm run export --gen-image
Generate all images:
pnpm run export --gen-large-image
The .mdx files in the pages folder are licensed under the CC0 license, and the rest of this project is licensed under the MIT license.