Close
0%
0%

Embedded Rust Hack Chat

Rust never sleeps

Wednesday, May 12, 2021 12:00 pm PDT Local time zone:
Hack Chat
Similar projects worth following

James Munns will host the Hack Chat on Wednesday, May 12 at noon Pacific.

Time zones got you down? Try our handy time zone converter.

Join

Programming languages, like fashion, are very much a matter of personal taste. Professional developers often don't have much say in which language they'll use for a given project, either for legacy or team reasons, but if they did have a choice, they'd probably choose the language that works best with the way they think. Some languages just "fit" different brains better than others, and when everything is in sync between language and developer, code just seems to flow effortlessly through the keyboard and onto the screen.

One language that consistently scores at the top of developers' "most loved" lists is Rust. For a language that started as a personal project and has only existed for a little more than a decade, that's really saying something. The emphasis Rust puts on safety and performance probably has a lot to do with that. And thanks to its safe concurrency, its memory safety, and its interoperability with C and other languages, Rust has made considerable in-roads with the embedded development community.

To learn more about Rust in embedded systems, James Munns will stop by the Hack Chat. James is an embedded systems engineer, with a history of working on software for a wide range of systems, including safety-critical avionics, and rapidly prototyped IoT systems. He's a founding member of the Rust Embedded Working Group, as well as a founder of Ferrous Systems, a consultancy focused on systems development in Rust, with a specialty in embedded systems development. James also used to write for Hackaday, so he must be a pretty cool guy. So swing by the Hack Chat and find out where Rust might be able to help you out with your next embedded project.

  • Hack Chat Transcript, Part 2

    Dan Maloney05/12/2021 at 20:12 0 comments


    Trevor R.H. Clarke12:43 PM
    @James Munns I agree crates, etc. make the library management and board management easy to implemented...maybe some extensions to vscode or similar to add a nice gui to everything + a basic event loop already setup with a setup/loop...

    James Munns12:43 PM
    @dkhayes117 that would be cool! We put a lot of work to make sure tools like probe-run work with editors like VSCode

    Timothy McKenna joined the room.12:43 PM

    Funny, I was just going to ask about Rust in VSCode...

    hpux73512:43 PM
    It's _excellent_

    James Munns12:43 PM
    > I agree crates, etc. make the library management and board management easy to implemented...maybe some extensions to vscode or similar to add a nice gui to everything + a basic event loop already setup with a setup/loop...

    Check out https://github.com/knurling-rs/app-template !

    James Munns12:44 PM
    We even include vscode configuration and unit tests (on/off hardware) already set up!

    john12:44 PM
    @James Munns , what about the other side of the wire? any production ready MQTT brokers? I've found some obscure bugs in mosquitto

    Trevor R.H. Clarke12:44 PM
    so in short....<generic question about embedded rust> Answer: Knurling

    anfractuosity12:44 PM
    What IDE do you use in linux out of interest (or does vscode work in linux now, i'm not sure?)

    James Munns12:44 PM
    I mean, Knurling is specifically my company's open source project to round off the rough edges of embedded development :)

    Yes, VSCode works in Linux.

    anfractuosity12:45 PM
    aha, ta

    WooDWorkeR12:45 PM
    since years? or forever?

    James Munns12:45 PM
    > What IDE do you use in linux out of interest (or does vscode work in linux now, i'm not sure?)

    I use SublimeText most of the time, other folks I know use VSCode mostly or some flavor of Vim!

    Marek Miettinen12:45 PM
    Are there any signs of MCU manufacturers putting any effort into official Rust support? As far as I understand all the current support comes from the community only?

    deʃhipu12:46 PM
    I suppose those who use emacs program in lisp ;-)

    Trevor R.H. Clarke12:46 PM
    not rust,,,but I've had a lot of luck with vernemq as an MQTT broker

    john12:46 PM
    yeah, the old erlang

    James Munns12:46 PM
    > I've been looking at using higher level but not interpreted languages on microcontrollers, and another contender seems to be Nim. Do you have any insight in why Rust or Nim would be the way to go?

    I haven't had much experience with Nim! I really enjoyed circuitpython when I've used it for prototyping, but I've mostly been doing Rust only for the last 3-4 years.

    James Munns12:47 PM
    > Are there any signs of MCU manufacturers putting any effort into official Rust support? As far as I understand all the current support comes from the community only?

    That is pretty accurate. We've talked with some folks, but big momentum to get them interested. We've already started to train larger tech + manufacturing companies. so the open source ecosystem doesn't seem to be a blocker for them! I hope the silicon companies will change their planning soon as well too :)

    James Munns12:48 PM
    Nordic Semiconductor has also sponsored a number of our events, like the Oxidize Conference, or our Knurling Sessions

    skyfire36012:48 PM
    @James Munns Do you get the impression that any vendors are catching on to the momentum that Rust is generating and are considering developing Rust SDKs?

    James Munns12:49 PM
    > Do you get the impression that any vendors are catching on to the momentum that Rust is generating and are considering developing Rust SDKs?

    We've certainly talked to a lot, but I'm not aware of any official roadmaps yet. That being said, the OSS support is already huge, and filling the gaps is a bit tedious but pretty quick once you get started!

    Marek Miettinen12:50 PM
    Exciting to hear Nordic showing some support. I know nothing about the realities of this market, but a wild guess would be that if a manufacturer would make an early investment into great Rust support, they could gain a lot of market...

    Read more »

  • Hack Chat Transcript, Part 1

    Dan Maloney05/12/2021 at 20:11 0 comments

    So let's get started! Like I said, lots of new names, so welcome to the Hack Chat. I'm Dan, I'll be moderating today along with Dusan as we welcome James Munns to talk about Rust.

    James Munns12:01 PM
    Hey all!

    James, are you online yet?

    Great timing...

    James Munns12:01 PM
    Yup :)

    regs.normal joined the room.12:01 PM

    Welcome aboard. Care to kick us off with a little about yourself?

    john joined the room.12:02 PM

    James Munns12:02 PM
    Sure, I'm James, I'm one of the founders of Ferrous Systems, where we do a lot of stuff with Rust, and lots of embedded Rust!

    Daniel Söderholm joined the room.12:02 PM

    skyfire360 joined the room.12:02 PM

    james0d0a joined the room.12:02 PM

    Dominik joined the room.12:03 PM

    James Munns12:03 PM
    I used to write for hackaday (a long time ago), and I've done a lot of embedded systems stuff for safety critical + connected devices areas

    Dominik12:03 PM
    Hi all

    James Munns12:04 PM
    I also just started learning how to do PCB design, and started playing round with some FM synth stuff, hopefully to make little embedded synths. Happy to answer any questions!

    A timely aspect of programming, given the attention that the Colonial Pipeline attack has attracted

    Chris Sattler joined the room.12:04 PM

    James Munns12:05 PM
    Ah yeah! I've seen that as well lately. Was that ransomware for that one?

    andypugh12:05 PM
    Yes

    loman.daniel12:05 PM
    whats the best way to get started with rust on embedded?

    Trevor R.H. Clarke joined the room.12:05 PM

    James Munns12:05 PM
    So, there's a lot of really great material out there, let me pull some links

    Yes, but I'm thinking about all the embedded devices in the SCADA system used to control these pipelines.

    James Munns12:06 PM
    https://docs.rust-embedded.org/ is a good place to find a couple of books/guides

    john12:06 PM
    I'm a newbie with rust, so I was wondering, is the ESP32 a good platform to learn rust?

    andypugh12:06 PM
    I have been assuming the pipeline thing is a Shodan / SCADA attack.

    loman.daniel12:07 PM
    do you use a HAL? or are you building rust functions to interact with your peripherals?

    James Munns12:07 PM
    The "Discovery Book" is meant for folks that are learning embedded, when they know rust, and the Book is meant for learning the embedded specific parts and libraries

    Sorry, didn't mean to derail the Rust chat, just thought the embedded aspect of both was interesting.

    Inne12:07 PM
    Does Rust give embedded devices super powers not to be had with C or python. (I heard something about simultaneous LED control).

    James Munns12:07 PM
    Ferrous also has an open source project called Knurling sessions, which is good if you like learning by doing hardware projects :)

    https://knurling.ferrous-systems.com/sessions/

    andypugh12:08 PM
    I think my first question about embedded Rust would be "why?" I can think of some likely reasons, but could you elucidate?

    Audi McAvoy12:08 PM
    Why choose Rust over <insert your favorite language here>?

    Brad Hanson12:08 PM
    Actually, I think there's an element there that might be interesting - do you see a future wherein Rust requires a similar restriction like MISRA C in order to comply with safety critical systems, or do you feel that the language is enough right now to prevent most safety-related issues?

    James Munns12:08 PM
    > is the ESP32 a good platform to learn rust?

    It's not great, Rust is built on top of LLVM (like Clang and Swift), and there isn't official LLVM support for that arch

    Alex M12:09 PM
    Hi James, thanks for your time.

    Is it possible to link existing c/c++ libs (arduino libs) And would you recommend it? =)

    skyfire36012:09 PM
    Hey James! Aside from the various handbooks/'nomicons, do you have any pointers to solid resources/git repos that demonstrate Rust patterns, practices, and general tips for embedded Rust?

    James Munns12:09 PM
    https://github.com/MabezDev/xtensa-rust-quickstart is the work in progress for experimental support, but cortex-m is the most supported platform

    Trevor R.H. Clarke12:09 PM
    I use...

    Read more »

View all 2 event logs

Enjoy this event?

Share

Discussions

Interested in attending?

Become a member to follow this event or host your own