Live data from Hacker News

The Rust on ESP Book

docs.espressif.com

21–25 of 25 posts

Re: The Rust on ESP Book

#21
post #12

Rust on ESP32 was great at one point. ~1 year ago there was a major HAL re-write and consolidation, and it went for me from working, to very broken, with most of the recent commits revamping it being done by someone who was neither an Espressif employee, nor someone who had written the original code bases. I haven't checked it since then. I bring this up as for some workflows, Rust is one of the easiest "just works"…

I’d completely agree - the transition to and instability of esp-hal has been a complete nightmare and I’ve also given up on trying to keep up with this. I have transitioned to using the Nordic NRF chips (nrf52840) for my hobby projects which are very well supported by embassy-nrf and have been a pleasure to use and have great (and stable) BLE support. You can also get really cheap boards from AliExpress (search for n…

Also probe-rs went from barely working to working somewhat to now being back again to barely working for most chips

Re: The Rust on ESP Book

#22

Earlier quoted context omitted.

Especially for embedded work (but for regular software too!) I've bought into the "sans-io pattern" for a lot of the software i write anymore https://sans-io.readthedocs.io/how-to-sans-io.html Keeping all of the actual hardware/network/io interface code separate really makes writing unit tests and porting to different computers much simpler

Interesting pattern but it sounds like it's fundamentally incompatible with setups using embassy https://embassy.dev/

Why would that be? one of the nice features of the sans-io pattern is that it seperates your HAL from the program itself; if your state machine says "send a network packet", send it using embassy (or tokio or bsd-sockets or whatever). The underlying libraries have little or no bearing on "write your program as a big synchronous state-machine"

same goes for "wait 10 ms" or "change this gpio pin".

Re: The Rust on ESP Book

#23
post #12

Earlier quoted context omitted.

I’d completely agree - the transition to and instability of esp-hal has been a complete nightmare and I’ve also given up on trying to keep up with this. I have transitioned to using the Nordic NRF chips (nrf52840) for my hobby projects which are very well supported by embassy-nrf and have been a pleasure to use and have great (and stable) BLE support. You can also get really cheap boards from AliExpress (search for n…

Also probe-rs went from barely working to working somewhat to now being back again to barely working for most chips

Oh yikes! What happened? Do you know roughly what version regressed and which chips? (I was tracking Probe-RS as one of the best parts of the ecosystem)

Re: The Rust on ESP Book

#24

Rust on ESP32 was great at one point. ~1 year ago there was a major HAL re-write and consolidation, and it went for me from working, to very broken, with most of the recent commits revamping it being done by someone who was neither an Espressif employee, nor someone who had written the original code bases. I haven't checked it since then. I bring this up as for some workflows, Rust is one of the easiest "just works"…

Would it be possible to fork the previous (good) version?

Yes, but it will be some work, and the most likely outcome is you would be the only person who uses it.

Re: The Rust on ESP Book

#25

awesome to see this under espressif.com! that's so fantastic. not to the point here, but i wonder what Zephyr would have been like if Rust had been more of a thing at the time. that's not really possible, as from my understanding it derived from Wind River Systems' donated Rocket OS, which i think predates Rust (which is not a new language!). still an interesting what if to me: zephyr seems to be the embedded os with…

This mirrors my experience also. I want to use embassy, and have tried several times. It gets recommended to me by people whose opinions I trust, so I keep trying. But Zephyr just works.
Post reply on HN