Give me one reason to use Rust in an embedded system.

Reply to this note

Please Login to reply.

Discussion

So you can talk shit about it

Less risk of crashes (e.g. due to leaks or segfaults) that could cause expensive aftereffects and may are hard to update depending on the accessibility of the deployed hardware?

all memory is allocated statically in this use case and invalid memory accesses are very unlikely to happen

Is there parallel or concurrent execution?

Concurrent.

Rust is still safer by default when concurrency is involved. There are C/C++ techniques to narrow the gap (MISRA) as well as formal verification systems (Frama-C). You can also liberally define critical sections by disabling interrupts

Predictability

Does this system have network access? Because if so, Rust's memory safety means there's much less probability of an exploitable security vulnerability caused by stuff like null pointers or buffer overflows.

No, why would it?

Memory safety is one reason to use Rust anywhere. It eliminates an entire class of bugs. It’ll piss you off if you’re not used to it, but it’ll make things safer.