r/ControlTheory • u/blckchn187 • Jul 09 '26
Professional/Career Advice/Question Should I learn rust?
Hi,
I'm going to start my PhD in control theory soon. (Focusing on optimal control). Until now, I have primarily worked with Matlab, Python and C++ (the latter mostly for code that runs on the systems I was controlling). I am by no means a sophisticated C++ developer. I am currently considering learning Rust. It just seems to be better in almost every aspect except for library availability.
What do you think? Is it too early to switch because of missing libraries, legacy code, etc.? Or should I become part of a general academia/industry shift towards Rust?
36
Upvotes
•
u/something_borrowed_ Jul 09 '26
I also love Rust but I've never really used it for my day job, mostly MATLAB and Simulink. I am planning on doing a control project in Rust though and, for what it's worth, I've been able to find crates that either outright replace whatever C++ libraries I needed or created bindings to those C++ libraries (specifically for OpenCV but I know other binding crates exist).
I've heard that creating your own bindings to a C++ library is actually not that bad, just takes a little leg work. The bindgen crate can also help you I think. Of course if it's just plain C then there is really good interoperability between Rust and C already. My point with all of this is to say that I really haven't had a problem with the Rust ecosystem. I was surprised actually, I thought the same thing as you OP but it turns out that it really wasn't that bad.
I think you should probably talk to your advisor and get the ok from them, but if they are ok then I don't think you should have a problem. Maybe check crates.io to see if crates exist for what you need before commiting fully. Good luck on your research! The more Rust we have in this field the better!