Re:Embedded Rules of Thumb (2018)
by rcxdude on Monday June 01, 2020 @06:30PM
(#23384794)
Rust actually has a better standard library story than C++ here, since it actually has a segmentation between the 'core' and 'std' libraries, where 'core' contains stuff which doesn't require heap allocation. Makes it a bit easier to know what will be supported. (and tbh, the standard library is low on the list of reasons to use C++, especially in embedded)
I think Rust has a lot of potential in the embedded space. I'm especially interested in if the async stuff will have power in making small and safe state machine writing easier: I think this could be extremely good at combining the power of stackfull tasks (which are wasteful on memory and less predictable) and state machines (which can be a pain to write, especially long sequential ones). If it lets you ship a product sooner with less bugs on a cheaper micro, I think it may be a strong proposition. Unfortunately given the industry is often unwilling to even consider C++ (and not for good reason: the reasons given for not using it or not even considering it are often based of off misconceptions or just outright falsehoods).
I think Rust has a lot of potential in the embedded space. I'm especially interested in if the async stuff will have power in making small and safe state machine writing easier: I think this could be extremely good at combining the power of stackfull tasks (which are wasteful on memory and less predictable) and state machines (which can be a pain to write, especially long sequential ones). If it lets you ship a product sooner with less bugs on a cheaper micro, I think it may be a strong proposition. Unfortunately given the industry is often unwilling to even consider C++ (and not for good reason: the reasons given for not using it or not even considering it are often based of off misconceptions or just outright falsehoods).