6 ms·
As a side note: I wish Rust would come to embedded development ASAP running a real time OS written in Rust. You can use massive Boost libraries and Qt framework
by fermienrico 8y ago
As a side note: I wish Rust would come to embedded development ASAP running a real time OS written in Rust. You can use massive Boost libraries and Qt frameworks on non-embedded systems with C/C++, but in embedded, there is no such luxury. I am new to it but it is painful and I wish to see a day where we have a complete LLVM based ARM compiler toolchain with Rust sitting on top. I think there were some blog posts about running Rust on STM32 but it is still very early.
- nicoburns 8y agoIt is still pretty early, but if there's been quite a bit of progress this year. This is probably the closest to what you are looking for that exists at the moment: https://github.com/japaric/cortex-m-rtfm https://github.com/japaric/cortex-m-rtfm You can also follow the Rust Embedded Working Group blog if you wish: https://rust-embedded.github.io/blog/ https://rust-embedded.github.io/blog/
- fermienrico 8y agoThank you for sharing, subscribed. As I read through the Rust Embedded Work Group manifesto, it is comforting to see the level of organizational skills, planning and vision of the team involved. Bravo. https://github.com/rust-embedded/wg https://github.com/rust-embedded/wg
- bluejekyll 8y agoHave you looked at TockOS? https://www.tockos.org https://www.tockos.org I took a class in it about 2 years ago now, it was really cool. I’m not an embedded developer though, so not sure of your needs here.
- vardump 8y agoOoh that looks pretty interesting! Tock appears to be a Rust based embedded OS, so relevant to this discussion. https://github.com/tock/tock https://github.com/tock/tock
- wyldfire 8y ago> I wish Rust would come to embedded development ASAP running a real time OS written in Rust. You want someone to write a Rust RTOS? Or would it suffice for a vendor to release a BSP with Rust support? IMO your current RTOS vendor can (and should!) offer this. Lots of existing RTOS companies will vendor a gcc or clang toolchain for their customers. The fact that C and C++ are well specified independent of their implementation really helps, though. But the baseline rust toolchain already provides a lot of what's needed. They "just" need to offer integration with their C library, designate llvm triple(s), etc. If your RTOS vendor offers support for C and C++ already, chances are you can write rust for your target already. Unfortunately you'll need to stick to no_std until that BSP shows up though. :)
- bluejekyll 8y agoBSP, board support package. I had to look that up, seem like what you’re talking about here.
- wyldfire 8y agoSorry, yes, that's what I meant. It's a soup-to-nuts working+tested configuration of a board, bootstrap code, examples that exercise board features, etc. IIRC this is common for chip/computer/board/RTOS vendors to provide.
- SlowRobotAhead 8y agoGet used to the idea that embedded is 15 years behind PC. Which is initially frustrating but if you step back is kind of a good thing. I’d also like to see Rust make it’s way into embedded. C support for things like data serialization or RPC for interfacing to web stuff is limited, people just don’t port it to C. And C++ doesn’t thrill me in terms of its non-deterministic garbage handling and difficult to debug nature. Rust though, seems modern and still safe, but I looked over the crates for embedded it’s prstty slim pickings! When I see mfgs pushing out their own Rust libs, or a professional IDE with support I can buy that uses the Rust compiler, I’ll give it a try. Until then, it’s clearly hobbiest-only.
- sidcom 8y agoNon deterministic garbage handling doesn't sound right in combination with C++. You have to do it your self. And you can make it deterministic.
- mlindner 8y agoC++ has deterministic garbage collection.
- intea 8y agoC++ does not have garbage collection of any sorts. Objects leave the scope and are destroyed, however the order in which they are destroyed is not defined by the standard.
- pjmlp 8y agoC++ has a garbage collection interface API since ISO C++11, it is up to the respective implementation to provide an optional implementation.
- jamesmunns 8y agoHey, I saw that links to the Embedded Working Group[0], TockOS[1], and others have been posted already, and those are great places to start! My company, Ferrous Systems[2], is also focused on embedded systems development in Rust, and we are already helping companies both with embedded linux and bare-metal/RTOS projects in Rust. We're also running a conference in Berlin on April 26th-29th called OxidizeConf[3] if you are interested in learning more about what is already going on in the Embedded Rust world :) [0]: https://github.com/rust-embedded/wg https://github.com/rust-embedded/wg [1]: https://www.tockos.org/ https://www.tockos.org/ [2]: https://ferrous-systems.com https://ferrous-systems.com [3]: https://oxidizeconf.com https://oxidizeconf.com