←back to thread

205 points michidk | 1 comments | | HN request time: 0.199s | source
Show context
nsoonhui ◴[] No.41835659[source]
I'm ignorant about Rust, but to me it's just static type language akin to C#. And C# has IOT library which seems to target Rust most usual use case, namely on embedded platform. C# also has memory safety just like Rust.

So why do we need Rust at all? What's the use case for it?

Anything that I'm missing?

replies(5): >>41835666 #>>41835762 #>>41836656 #>>41839000 #>>41843390 #
15155 ◴[] No.41835666[source]
> Anything that I'm missing?

C# is garbage collected. This is a no-go in many/most embedded software applications.

C# also grants you poor explicit control over heap/stack allocation: this is essential for embedded development.

replies(3): >>41835721 #>>41838112 #>>41838658 #
nlitened ◴[] No.41835721[source]
Is it really true though? I don't have much knowledge about embedded development, but as far as I know, Java has been used in many embedded systems, and was running on phones' SIM-cards. Please correct me if I am wrong.

I think that most modern embedded systems are nowadays more powerful than my first desktop computer — is it really still worth for the majority of embedded projects to count every byte at the expense of developers' productivity (and overall project success, as a result)?

replies(2): >>41835786 #>>41835829 #
1. psychoslave ◴[] No.41835829[source]
Not sure how well it fits reality, but it’s also to a large extend how dramatic can be the result of a fault of your system.

If it’s embedded in a coffee machine, maybe all cost-effective taken into account it’s ok to have an over-bloated software stack maintained by the cheapest folk the manager could found.

Now if you are working on embedded software for some vehicle like a critical part of a car, a train or a spaceship, considerations of safety for both ethic and legal reasons might lead to different tradeoffs and conclusions.