Don't do esp-idf-* with rust.
Really.
ESP-RS (baremetal) is usable, and nice.
I would happily recommend it if you can live with the state of bluetooth/wifi not being awesome quite yet.
ESP-IDF-* is a consistent mess. APIs break continuously and in ways that are often hard to upgrade.
It is very difficult to find a combination of library versions that work with anything else in the ecosystem (embedded-), mainly due to esp-idf not keeping up or doing weird things. This is deliberate - they want to move esp- everything forward together, which is nice, except nobody else in the entire embedded ecosystem is on their release schedule so the result is things are always broken. Even funnier is that this all happens while esp-idf itself is rather stable and usable.
In fact, at various times, it has been in a known-broken state with the latest stable ESP-IDF for months. Known broken here doesn't mean "some stuff doesn't work". It means "it doesn't build at all and requires you hand-patch git checkouts to make it work".
You can read how at least one main maintainer responds to issues (which basically amount to explaining why everyone else is wrong and they are right. It's fun to watch them recommend their own libraries as the one-true-way and tell people that they think it's a mistake to use loops so they don't care that something doesn't work), and get a good feeling for why all the above is true.
Everyone else in the community is quite nice and reasonable, and seems to care about users.
But at this point, i'm literally taking projects I wrote in ESP rust and moving them back to C++ (one right now, in fact, i'm taking a break to write this comment) and will try again for years.
Given how it has gone, and the direction that certain folks push in, i don't have a lot of faith it will get significantly better.
If you want to do baremetal, do it and live with it. If you want to try to use esp-idf, i would highly recommend you don't do it.
I literally have to keep copies of patched, pinned, libraries and sdks to something that works in the esp rust things i have.
For future rust work, i will only use things supported by embassy.
Great info, with this caveat:
> I would happily recommend it if you can live with the state of bluetooth/wifi not being awesome quite yet.
ESP32's main niche is embedded WiFi and Btle. With Bluetooth there are some alternatives, but Espressif is the nicest. For Wi-Fi, there are no integrated alternatives I'm aware of. So, if I'm on ESP, it's probably because of WiFi and/or Btle, which makes IDF appealing.
I know. I actually use to get easily integrated lora without hats, etc (through heltec's ESP stuff), along with bluetooth for updates.
But the state is why i couldn't use baremetal at the time - the firmware kept crashing.
For this kind of thing, NRF's softdevices are a much nicer alternative and work fine in embassy.