How are you finding it ? Are you using it on bare metal or with an (RT)OS ? What compiler are you using ? How is it better than C/C++ ?
Thanks
Edit
I'm looking at Rust for the fun of it. I'm just getting into it.
There are some things I like like:
- using {} as a placeholder for a var in a print statement. I don't like println!. Makes me think of Pascal.
- using AND, XOR, etc for bitwise ops.
- directly stating the size and type of the number - i32, u8, etc, instead of char, double, long, etc.
- slicing arrays is nice. Maybe I've been working in Python too much lately.
- I love /// and //! for generating doc right from the code comments.
Haven't used it enough to know what I don't like yet.
Rust for embedded systems programming
Rust for Embedded Systems: Current state, challenges and open problems
Is Rust suitable for embedded development with focus on wireless sensor nodes (and networks)? - Stack Overflow
What's the current status and the future of Rust language in embedded systems?
I believe that the barrier to it's current acceptance as a production ready embedded language is tooling.
For example, you want to get a GUI application running on a dev board with an attached LCD. For STM, you open up a suite of tools, pick your options graphically, hit the magic 'generate me' button, and you're up and running writing your domain logic in an hour.
Doing the same in Rust entails tracking down a supported HAL, ensuring that all of the peripherals needed are fully supported, spending a solid day lamenting the state of graphics libraries in Rust, spending a solid day dicking around with FFI interfaces, Spend a solid say explaining to your grandbosses that 'this IS better, we swear... '
When you're at the managerial level, time is money. Promises of memory safety and reliability sound amazing and all, but end of day, they want to ship shit yesterday.
More on reddit.comVideos
Hello, I started learning rust last month and have been loving the uniqueness of it. The guarantees the compiler ensures makes it super nice, and based on the amount of errors the compiler catches, I feel rust would be a good language to learn embedded systems programming.
I am a 3rd year student in college, with a couple years experience in web development and cloud architecture in AWS, having little experience in Embedded Systems. I have finished the Rust Lang book and have began to read the Rust Embedded Discovery book. I want to use the Embedded Systems programming in rust to work with robotics and computer vision.
You might be biased given what subreddit I'm posting this on, but would someone be able to reassure me rust is a good platform to begin in robotics/computer vision over something like python? I lean more towards rust because the robust compiler which I would guess makes debugging much easier which is hard enough in embedded systems programming. Plus rust is cool 😎
Thanks! :)
Sure!
You can check out more at Embedded devices, but summarized it's very, very good for embedded development - as a technology. It has better memory safety than the C-family, it's optimized for fast compilation in the current paradigm and it seems to be doing okay with concurrency (okay-er than Embedded C). It also seems to be fairly well-balanced with newer microprocessors, which knowing the hoops some producers are jumping through recently to push out their products on the market - will definitely help you if you run into particularly janky components (which in my experience of budget electronics, you will encounter a lot with clone producers) Besides, you can integrate it with an already existing C codebase so you can add your new code to a priory existing example of an application which does what you want your Rust application to do, then reverse-engineer it. This will be a great help for you if you're starting out now.
Somewhat paradoxically, I would also strongly advise you to wait if you want to start your career in this direction. Rust is absolutely not mature enough for complex projects on an industrial scale. On one hand most producers of chips don't care much for it - so for the moment it's a one-way relationship with small producers. On the other hand, some of my contacts have had some strange bugs while wrapping up and starting testing their prototypes including, but not limited to, unexplained behaviors and even stack overflows due to not-so-great libraries being worked on at an accelerated rate and not being cleaned all the time.
Yes, Rust is suitable for communication and encryption protocols as well as intrusion detection systems in resource-constraint environments like sensor nodes in WSNs. Rust has several advantages over C/C++ for these applications, including stronger memory safety guarantees, faster compile times, and better support for concurrency. However, it is still in early stages of development and there are some limitations compared to C/C++, such as a lack of support for certain hardware architectures, operating systems, and manufacturer APIs. With continued development, these limitations are likely to be addressed in the foreseeable future.