4 ms·
Rust has benefits over C++. But you cannot just port a project from C++ to Rust, especially if you use a Qt GUI. To combine Rust with Qt you could use a langua
by oever 9y ago
Rust has benefits over C++. But you cannot just port a project from C++ to Rust, especially if you use a Qt GUI.
To combine Rust with Qt you could use a language binding that wraps Qt in a Rust API. This is a very big undertaking and will result in an API that is not Rusty at all. Qt is a great toolkit but it does not have all the safety guarantees that Rust has. So the Rust API on top of Qt would have a complicated manual.
This binding generator creates code from a JSON description that is very limited compared to Qt or Rust, but it generates code that is good Qt and good Rust.
The generated code has no dependencies apart, obviously, from Qt and Rust and the generator itself is small and has no dependencies apart from Qt.
Yes, if you combine two languages, you get the warts from both languages and that is indeed uglier than using a single language.