Live data from Hacker News

Rust on Espressif chips

mabez.dev

11–20 of 71 posts

Re: Rust on Espressif chips

#11
post #4

I was looking forward to trying Rust on my ESP32 projects but always had a hard time. All the tooling is too complicated. There is flasher coded in python, IDF coded in C, you need to run MinWin on Windows which makes it even harder. You can't run all of this in docker because docker for windows doesn't allow mapping COM ports into container and stuff. Everything about just compiling a code seems so tiresome and unst…

I did not liked the old ESP flasher tool much either.

FYI: There's already an official rust based rewrite of it: https://github.com/esp-rs/espflash

Re: Rust on Espressif chips

#12
post #2

I'm curious about this as someone who is interested in making DIY smart home products as well as their recently announced Zigbee radio module. But genuine question, is Rust ever going to catch on in the mainstream? It seems to have a bunch of nice to have features and great optimization. But the pick up, from what I've seen, has been less than stellar.

> But genuine question, is Rust ever going to catch on in the mainstream? It seems to have a bunch of nice to have features and great optimization. But the pick up, from what I've seen, has been less than stellar. I'm not sure where you've gotten that impression. Rust is mainstream at this point. All the big companies (e.g. FAAMG) are using Rust. Lots of large products are: Firefox of course, but also, parts of AWS,…

I think the key is that it's mainstream at the system/platform layer, not so much the application layer (though maybe one day!). Its benefits to the former are clear and undeniable; a paradigm-shift. Its benefits to the latter are pretty mixed by comparison. Anyone who mostly hangs out at the application-layer and doesn't follow this stuff closely could miss the adoption it's getting elsewhere.

Re: Rust on Espressif chips

#13
post #4

I was looking forward to trying Rust on my ESP32 projects but always had a hard time. All the tooling is too complicated. There is flasher coded in python, IDF coded in C, you need to run MinWin on Windows which makes it even harder. You can't run all of this in docker because docker for windows doesn't allow mapping COM ports into container and stuff. Everything about just compiling a code seems so tiresome and unst…

> Wouldn't abandoning Xtensa architecture for RISC-V help? Are there any plans to simplify the stack?

I mean, the new one's are already risc-v based and they added tier-3 compiler support for those in rust recently (1.56 IIRC), not sure if they still plan to release xtensa based ones in the future.

Re: Rust on Espressif chips

#14
post #2

I'm curious about this as someone who is interested in making DIY smart home products as well as their recently announced Zigbee radio module. But genuine question, is Rust ever going to catch on in the mainstream? It seems to have a bunch of nice to have features and great optimization. But the pick up, from what I've seen, has been less than stellar.

> But genuine question, is Rust ever going to catch on in the mainstream? It seems to have a bunch of nice to have features and great optimization. But the pick up, from what I've seen, has been less than stellar. I'm not sure where you've gotten that impression. Rust is mainstream at this point. All the big companies (e.g. FAAMG) are using Rust. Lots of large products are: Firefox of course, but also, parts of AWS,…

I understand that it is very popular and is increasing adoption. But I was more targeting the embedded systems/hardware. Obviously this blog post is a step in that direction, but I'm still curious if hardware manufacturers will want to spend time adopting it.

Re: Rust on Espressif chips

#15
post #2

I'm curious about this as someone who is interested in making DIY smart home products as well as their recently announced Zigbee radio module. But genuine question, is Rust ever going to catch on in the mainstream? It seems to have a bunch of nice to have features and great optimization. But the pick up, from what I've seen, has been less than stellar.

Rust is gaining momentum at a decent pace IMO. It's not necessarily a web technology so expect slower adoption but still it's been steadily growing.

> It's not necessarily a web technology

And honestly, I've been toying around with an Actix web server written in Rust, and the experience is not bad. As someone new to Rust, the main pain points have been along the lines of figuring out how to type a parameter to accept both a database pool and a database transaction (which turns out to be quite hard to figure out). Other than that kind of friction, the experience has been nice.

Re: Rust on Espressif chips

#16
post #4

I was looking forward to trying Rust on my ESP32 projects but always had a hard time. All the tooling is too complicated. There is flasher coded in python, IDF coded in C, you need to run MinWin on Windows which makes it even harder. You can't run all of this in docker because docker for windows doesn't allow mapping COM ports into container and stuff. Everything about just compiling a code seems so tiresome and unst…

> Wouldn't abandoning Xtensa architecture for RISC-V help? Are there any plans to simplify the stack? I mean, the new one's are already risc-v based and they added tier-3 compiler support for those in rust recently (1.56 IIRC), not sure if they still plan to release xtensa based ones in the future.

Yes but they didn't yet release dual-core RISC-V based or did I miss it?

I use it's dual-core capabilities extensively as I heavily utilize WiFi and still have to maintain low-latency processing of IO input.

Didn't look much into RISC-V ESP but does it have some interrupts without multiplexor?

Re: Rust on Espressif chips

#17
post #4

I was looking forward to trying Rust on my ESP32 projects but always had a hard time. All the tooling is too complicated. There is flasher coded in python, IDF coded in C, you need to run MinWin on Windows which makes it even harder. You can't run all of this in docker because docker for windows doesn't allow mapping COM ports into container and stuff. Everything about just compiling a code seems so tiresome and unst…

If you're up for it there's a lot of fiddly work you can do to make your windows serial device exposed with a RFC2217 network server and then mapped as a serial device inside your container. Can see the basic idea here: https://gist.github.com/DraTeots/e0c669608466470baa6c You'd want to use hub4com to go serial device -> network server on windows and then socat or ser2net inside the container to go network server -> serial device. I agree though it is entirely too complicated and much more of a pain than it should be in practice.

Re: Rust on Espressif chips

#18
post #2

I'm curious about this as someone who is interested in making DIY smart home products as well as their recently announced Zigbee radio module. But genuine question, is Rust ever going to catch on in the mainstream? It seems to have a bunch of nice to have features and great optimization. But the pick up, from what I've seen, has been less than stellar.

@work we do most of our new development in rust and did so since 2019, its quite a lot more than stellar than most other things we work(ed) with, and we had some interpreted dynamic and some compiled C stuff, its an improvement from either direction..

While at work I'm doing more software development I originally studied comp. eng. and dabbled around quite a bit with embedded systems, mainly in C, ASM and tinyOS with its nesC dialect+framework. Rust is a god send in lots of areas there too, you can establish zero-cost (well some compile cost, but zero runtime ones) contracts and static guarantees with the type systems, like disallowing that code that would produce a register pull up/down configuration with a short-circuit from happening, or shared access to resources can also be done in such ways. Check the respective chapter of the rust embedded book for more info:

https://docs.rust-embedded.org/book/static-guarantees/index....

Re: Rust on Espressif chips

#19
post #16

Earlier quoted context omitted.

> Wouldn't abandoning Xtensa architecture for RISC-V help? Are there any plans to simplify the stack? I mean, the new one's are already risc-v based and they added tier-3 compiler support for those in rust recently (1.56 IIRC), not sure if they still plan to release xtensa based ones in the future.

Yes but they didn't yet release dual-core RISC-V based or did I miss it? I use it's dual-core capabilities extensively as I heavily utilize WiFi and still have to maintain low-latency processing of IO input. Didn't look much into RISC-V ESP but does it have some interrupts without multiplexor?

Yes, esp32-c3 [0] can be bought already, e.g., from mouser [1] or sparkfun [2] either as dev kit or as native module for a self-designed PCB.

[0]: https://www.espressif.com/en/products/socs/esp32-c3

[1]: https://www.mouser.de/new/espressif/espressif-esp32c3wroom02...

[2]: https://www.sparkfun.com/products/18034

Re: Rust on Espressif chips

#20
as someone who occasionally dabbles in diy esp based home automation devices (mostly with esp8266) but completely new to Rust, where's the best place to get started? some code example to look at?
Post reply on HN