Live coding a ray tracer in Rust. Part 1: project setup and the first image

Опубликовано: 17 Май 2026
на канале: Artem Pianykh
2,566
103

Live coding "Ray Tracing in One Weekend" but using Rust instead of C++. In this video I setup the project, talk about structs, traits, new-types, snapshot testing, and of course write code to output the first image.

Ray Tracing in One Weekend: https://raytracing.github.io/books/Ra...

The OCaml version:    • Live coding a ray tracer in OCaml. Part 1:...  

00:00 - Intro
02:08 - Plan
03:36 - Project setup
04:35 - PPM Image Format
05:44 - Domain modelling
07:01 - Snapshot testing with k9
10:36 - Implementing the Image
15:29 - PPM encoding with a new type
24:55 - Traits ❤️
26:01 - Tuning the output format
26:31 - Fleshing out "main"
28:57 - First image output
33:40 - Recap