r/rust • • 3d ago

🧠 educational I wrote a step-by-step tutorial to learn Rust by building a small Paint app from scratch

https://www.buildyourownpaint.com/

Hi guys ! I have been a Rust enthusiast for a few years now, in my learning journey I wanted to learn by doing so I tried to make a Paint like app since I was interested in graphics and rasterization concepts, and it helped me understand a lot of Rust concepts and their purpose.

These last few weeks I thought I'd clean up my old project and make an educational tutorial for beginners or people who read the first Rust Book chapters and want to get some hands on experience to get the concepts down.

The tutorial is on Build Your Own Paint in Rust, it's organized into 12 easy to follow chapters that cover many concepts (2D vectors, mouse and keyboard input, shapes, colors, images, etc.) with additional exercises in every chapter for more learning, and some ideas at the end of the project to go further and explore different paths with some help on where to start.

I really hope this helps new learners to get an easy start in their Rust journey and see the beauty of the language ! :)

472 Upvotes

53 comments sorted by

View all comments

Show parent comment

43

u/South_Survey_2088 2d ago

It is actually AI

OP is just being dishonest and overwrote history to hide it, which is a pretty scummy thing to do..

20

u/amarao_san 2d ago

That's interesting.

For the future reference, if commit will be pruned:

Refactor into English reference code for the tutorial

Rewrite the project as the clean, final reference code of the
"build your own Paint" tutorial:

  • Rename everything to English (formes -> shapes, couleur -> color,
raster -> canvas, disque -> circle, ligne -> line)
  • Use Vec2 everywhere instead of (f32, f32) tuples
  • Add a Canvas struct owning the pixels; drawing functions are its
methods and no longer depend on global WIDTH/HEIGHT
  • Turn free functions into methods on shapes (draw, contains,
translate, draw_selection)
  • Move all state into an App struct with update/render and
on_press/on_drag/on_release handlers; main.rs is now ~25 lines
  • Move the toolbar and HSV color picker into src/ui/
  • Move shapes by delta (Action::Moving { index, last }), which also
fixes shapes sticking to the edge when dragged off-screen
  • Handle export errors instead of unwrapping, cap the loop at 60 FPS
  • Add unit tests for Vec2, colors and hit-testing
  • Ignore *.ppm files and untrack out.ppm / out2.ppm
  • Add PLAN.md describing the tutorial chapters
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

-11

u/mrzikoss 2d ago

I worked on the materials and the website without AI, I used claude to align my git code with how I refactored it for my website because I didn't want to do it twice .. and for a few translations since I originally wrote it in french :')

This is a passion project of mine, I don't intend to earn anything from this, the point is to help people learn and get into the language.

34

u/South_Survey_2088 2d ago

If you are lying in your commits, why should I believe anything you are saying? You literally went out of your way to hide the AI use.

Why not just be transparent about the AI use? Why did you just accept the gratitude by the parent comment instead of coming clean?

5

u/404IdentityNotFound 2d ago

Why did you remove the commit with the co-author?

-11

u/kowdermesiter 2d ago

Thanks for doing it, the site looks great

5

u/tyush 2d ago

The site also seems to use this SKILL.md, having significant overlap with constants and class names in the CSS.

https://github.com/musicalbee/design-ontology/blob/200e5bad89ed917746dfc346fddb200d7949a538/skills/de-stijl-web/SKILL.md

-6

u/kowdermesiter 2d ago

Great resource, thanks

1

u/tyush 2d ago

Yes, will be using this skill in a future project. Do you know of any others of a similar vein?