Need help on gui <-> rust backend concept


Hello everyone,

I maintain a little 3D-editing-tool written in Delphi that desperately needs a rewrite. It has a GUI with an OpenGL-Frame and some functions to handle geometric data (triangles, maybe nurbs someday, some lines, …). Now I would like to have a good concept on how to make a clear separation between the GUI elements and the “backend” which handles the data. I wouldn’t write into this forum if I didn’t prefer Rust as the language for the backend :slight_smile:. My idea was to provide the backend as a dll (I work on windows), which I can tell stuff like “start a new project”, “Load data from file X”, “Select the surface X”, “Move the selected surface to point X”, “Draw all data to the current viewport”, … . The GUI would be written in C#, Qt or Delphi and just send the requests to the backend.

Now I very much lack experience in this area but i am eager to learn. How would a good basic layout of the backend look like?

Thanks for reading and your help! :relaxed:

Edit: To elaborate a bit more: I know how to write functions in language X and use them via a dll in language Y. The thing that bothers me is how to accomplish the persistency of the geometry data inside my backend. I have a feeling that global variables are not a good way, at least not a very rusty way to achieve it. But maybe I am wrong… how would you do it?


I did some more reading and found that PyQt/PySide seems to be a good option for the GUI part with rust for heavy calculations. But how would that work out for intense 3d-data rendering? Does anyone have experience in that respect?