A few years ago I started a small prototype where I tried implementing some parts of this program in Rust. The language and its tooling are, in my opinion, very well designed and a great improvement over C++. But I also realized that the ecosystem of libraries was not yet mature enough for the task. Especially the options for scientific computing and GUI programming were lacking when compared to mature C++ libraries like Eigen and Qt.
There have been a lot of improvements since then, but many roadblocks still remain. So this issue is meant for keeping an eye on Rust, tracking any relevant developments and thinking about possible routes for a gradual transition.
Rewriting the whole thing in Rust at once doesn't make much sense. But since VirtualBow's solver, pre- and postprocessor have been split into three separate components, it would be possible to try and switch them one by one. The solver would be a good first candidate for this, because it needs no GUI and is ripe for a major overhaul anyway.
Benchmark Rusts linear algebra libraries and bindings against Eigen and make a decision based on features and performance
Remove remaining interdependencies between the C++ codebases of the solver and the GUI. Make the GUI call the solver via "extern C" instead (maybe even pass the data via json/msgpack).
Rewrite the solver in Rust with the same C interface
Motivation
A few years ago I started a small prototype where I tried implementing some parts of this program in Rust. The language and its tooling are, in my opinion, very well designed and a great improvement over C++. But I also realized that the ecosystem of libraries was not yet mature enough for the task. Especially the options for scientific computing and GUI programming were lacking when compared to mature C++ libraries like Eigen and Qt.
There have been a lot of improvements since then, but many roadblocks still remain. So this issue is meant for keeping an eye on Rust, tracking any relevant developments and thinking about possible routes for a gradual transition.
Lacking areas
GUI Programming
gtk-rs
sixtyfps
iced
egui
Scientific Computing
ndarray
nalgebra
Low-level bindings
None of those, as far as I can tell, have anything similar to Eigen's expression templates.
Good areas
Serialization
#[derive(Serialize, Deserialize)]
json
,msgpack
and moreTooling
deb
packagesrpm
packages.app
,.deb
,.msi
)Utilities
Possible routes for transition
Rewriting the whole thing in Rust at once doesn't make much sense. But since VirtualBow's solver, pre- and postprocessor have been split into three separate components, it would be possible to try and switch them one by one. The solver would be a good first candidate for this, because it needs no GUI and is ripe for a major overhaul anyway.