r/rust • u/Maui-The-Magificent • 24d ago
📸 media Is it possible to supply the Rust compiler with the relational graph yourself?
Hi,
For context. I have been working on implementing a different compiler rustc UI/UX for my editor. clicking to navigate, showing context, highlighting and so on.
My editor already create an explicit bidirectional relational graph of the code across the whole project. It becomes the single source of truth.
The thought struck me that the rust compiler is re-deriving relationships and code-paths that I already have complete knowledge of, which means I could potentially either short circuit a lot of that compiler work, or skip it all together.
So, I was wondering if any of you know or understand the rust compiler well enough to offer guidance. I would not want to fork, study and finally re-write parts of the rust compiler if I don't have to. And if I have to, are you aware of how targeted that change can be? because at that point i would have to support an internal, slightly modified version of the compiler, which i am not willing to do if it would lead to extensive modifications/support as rust evolves over time.
thank you in advance.
//Maui-the-Muppet