4 ms·
The C++/Qt/QML code calls into Rust. The Rust parts are only calling to C++ with callbacks passed into Rust. Those callbacks are small and typical Qt. They do c
by oever 8y ago
The C++/Qt/QML code calls into Rust. The Rust parts are only calling to C++ with callbacks passed into Rust. Those callbacks are small and typical Qt. They do construction, destruction and (thread-safe) signaling.
So as per custom in Rust the safety rules of the C/C++ code is encoded in the Rust API which makes that part safe.
The C++ part calling Rust has the normal C++ safety guarantees, which are less strict than Rust. To have concurrency safety, it is recommended to only do the one GUI thread for C++ and do the multi-threading in Rust.