TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Learning Rust for Embedded Systems

84 点作者 tekkertje超过 3 年前

4 条评论

kennywinker超过 3 年前
I’m currently working on a product using rust on stm32 hardware. I’m very thankful to be using rust instead of c&#x2F;c++ for a variety of reasons. That said, so far the big pain points so far have been:<p>Each HAL implements different things, or the same thing in different ways. I’m in the middle of switching from the stm32f1 i started on to the more capable stm32f4 and it’s been a painful switch. I assume this would also suck in other languages, but it seems fixable in rust. There’s also widely varied support for other MCUs<p>Lack of emulation. You can emulate an arm cpu in qemu, but there’s no tools for mocking out hardware - which means testing has to happen on device (or you need to fragment your application into qemu-testable pieces)<p>Shared memory &#x2F; global initialization is overly complex. If you have a resource (say a gpio pin) that you want to set up in main but use in an interrupt and nowhere else, you have to use like five layers of abstraction to “safely” do that.
评论 #29270228 未加载
评论 #29270524 未加载
评论 #29271122 未加载
评论 #29270078 未加载
评论 #29271202 未加载
mcraealex16超过 3 年前
Type state programming with embedded Rust has stopped me from a number of bugs so far. The important thing for me is that these bugs were caught at compile time which makes a world of difference in terms of productivity. The biggest pain point is how different the libraries for different microcontrollers are. I feel over time they will converge as things stabilize, time will tell.
nynx超过 3 年前
We&#x27;re using rust on STM32F1 chips as part of the electronics for a liquid rocket engine that my university&#x27;s SEDS chapter is developing. Rust makes this all so much easier and quicker to write.
sdbranam超过 3 年前
Thanks for submitting my post, and I hope everyone finds it useful!
评论 #29294037 未加载