Hacker News new | ask | show | jobs
by wokwokwok 655 days ago
Rust bridge with C++ is a solved problem; since they have the same calling semantics you can easily bind rust callbacks to your c++.

JavaScript-Rust bridging (or any managed language) is slower and more effort to explicitly design.

My $0.02 would be: with widgets you can implement a lot of complex backend logic in rust, using a package manager that works (ie. cargo) to get significant productivity gains from the rust ecosystem for implementing the logic of your application. Specifically for example, threaded processes, network interactions and file parsers / exporters which get you “for free” functionality for eg. Loading .vox or .fbx files in an app, then passing them to c++ for processing / editing / rendering in the ui.

With QML you’d have to do that by hand. What a meaningless chore.

Also with QML, the runtime is not node compatible, so forget using existing packages in that ecosystem to help.

(There are obviously downsides too, like rust for mobile, but for desktop applications rust static builds are trivial to bundle in the c++ build process using cmake).