Methodology to discover a new project

Hi, i'm hunting github's project containing some library to better understand them after having read the docs.
But i'd like advices about getting the big picture.
I am drawing squares representing the files and sub squares for the strucs. i draw arrows to link betweenfunctions and variables, i change color for (mut)value / (mut) references...
i'd like to know your own methodology and ideas or tools helping to visualize it like i did in python with UML.

1 Like

I like to go function-by-function: I'll choose a function representing a key functionality of the library, then read through it as if I'm executing it in my head, try to understand what it does, and then if it delegates its operation go dig deeper. I use "go to definition" in VS code a lot, and just keep going deeper and deeper, trying to build up a mental model of what pieces of code this code touches.

If there are key interesting details, I'll also write them up in a markdown or other word language document. Just like, writing my thoughts on the crate. I mostly try to build up a mental model, though.

What you've described doesn't sound too bad. If you can couple that with an understanding of what each thing does, then it should work out well?

Drawing arrows to link between things might get a bit messy if you draw it for everything, but if you can identify the key chains of functionality, then that should still be useful. By that I mean I wouldn't recommend drawing an arrow to unwrap every time its called, or any other utility-ish function.

1 Like

I just open the API docs.

Rust projects tend to be better documented than most, and the API docs or examples/ folder will often have examples showing how to use the library at a high level. That gives you an idea of the main types/concepts in a library, and from there you can click through the item's docs to see related concepts.

After clicking around a bit you get a good feel for the project and how things fit together.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.