Hello. I’m building a tool whose goal is to analyze a crate, and display in a graphic fashion information about it’s internal. At the moment it’s mostly the callgraph (both direct call and through function pointer / Fn traits), as well as displaying the places where a function pointer (or similar) is created. My prototype is working well. I’m using graphviz to generate the graph but this is very impractical, because I want to interactively display a very small subset of the whole graph (let say 10-30 functions and their relations among the 50k+ functions and relation of a crate). Let me give you a mock-up:
Note: the black dotted box and the big black circles are just construction traits, they shouldn’t appear in the real rendering.
- I want to be able to move (using a mouse/keyboard/trackpad) the boxes. It should make the text inside, as well as the end of the arrows move together.
- The arrow (both solid or dotted) outside of the boxes should never cross another box, and minimize superposition between themselves (ideally they should cross at 90°) for maximum readability.
- I want to be able to add an remove the set of visible functions (and this means recomputing the optimal path for the arrows).
- I need to be able to display text with colors, and access it’s exact coordinates of the substrings to create the arrows (where they start / finish / merge) as well as the collision boxes for the functions.
I’m looking for crates that could help me generates such drawing, especially for the interactive part, and the routing / collision detection of the arrows.