You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works if you don't overload it. The ESP32-S3 is a microcontroller with limited resources. The web server can only handle a few requests at a time before it runs out of memory.
Ballpark numbers
5 concurrent requests
50 requests per second
If I go over ~5 concurrent requests, IDF runs out of memory and crashes.
Axum wasn't designed for microcontrollers to put it mildly. It's actually a miracle it works at all. I did this for science. We do what we must because we can.
Alternatives
Besides Axum, Warp also works. It uses somewhat less memory, so you can maybe throw a few more requests at it.
At the time of writing this, Rocket and Actix-web don't work since they require Tokio's rt-multi-thread feature which doesn't compile on EPS32 yet.
Honestly, just use MQTT or something. It's a microcontroller, not a server.
Other ESP32 chips
See .cargo/config.toml for the list of supported chips. Set the target to the chip you're using.
Acknowledgements
This project is heavily inspired by Sami J. Mäkinen's esp32temp. Thanks for figuring out how to make this work!