Which framework should you use on the ESP32? Arduino, ESP-IDF, MicroPython or Rust

An honest comparison of ESP32 frameworks: Arduino, ESP-IDF, MicroPython, Rust and Lua. Which one to pick based on your experience, your project and your time.

Also available in: EN, ES

Series Introduction to the ESP32 Part 10 View the series →
Comparison of ESP32 frameworks

Here comes the most repeated question: what do I program the ESP32 with? The short answer is “it depends”, and the useful answer is this table. Pick based on where you stand and what you want to achieve.

The five paths

FrameworkLanguageCurveControlBest for
Arduino coreC++Very lowMediumStarting, prototypes, sensors
ESP-IDFC (C++)HighTotalProducts, RTOS, performance
MicroPythonPythonVery lowLowLearning, quick tests
RustRustMedium-highHighRobustness, safety, no_std
Lua (NodeMCU)LuaLowLowLegacy, very simple scripts

Let us be clear: there is no best one, there is a better one for you right now.

Arduino core: where almost everyone starts

You write setup() and loop(), call pinMode(), digitalWrite(), and that is it. Thousands of libraries and examples.

  • Pros: you start in an afternoon, huge community, everyone can help you.
  • Cons: it hides things (tasks, memory, partitions), and when something weird happens, you do not know where to look.
  • Current version: 3.3.11 (built on ESP-IDF 5.5.5).

Use it if you are starting, building a prototype, or coming from Arduino.

ESP-IDF: the “real” one

It is Espressif’s official SDK. Here you control everything: FreeRTOS, tasks, queues, partitions, menuconfig, logs, power, security.

  • Pros: total control, better performance, fully documented by the vendor, the base of everything else.
  • Cons: more concepts to learn and more code for the same thing.
  • Current version: 6.1.

Use it if you are going to production, need fine timing, or want to squeeze the hardware.

MicroPython: understand it in 5 minutes

Flash the firmware, open a REPL and write Python. Perfect to learn and to tinker without compiling.

  • Pros: immediate, fun, great for teaching.
  • Cons: slower, more RAM, and not every peripheral is covered.
  • Current version: 1.29.

Use it if you want results now, or you come from Python.

Rust: power with a safety net

The esp-rs ecosystem gives you two paths: esp-idf-hal (on top of ESP-IDF, with std) and esp-hal / embassy (no_std, lighter and async).

  • Pros: the compiler prevents memory and concurrency bugs, very robust code, real async with embassy.
  • Cons: learning curve, separate toolchain (espup), younger ecosystem.
  • Current version: esp-hal 1.2.0.

Use it if you care about reliability, come from Rust, or want to learn something serious.

Lua (NodeMCU): the past

It was popular with the ESP8266. Today it is largely abandoned next to MicroPython. It only makes sense to maintain old projects.

The decision, in 20 seconds

Your situationStart with
It is my first microcontrollerArduino core
I can program, but not C/C++MicroPython
I need control and performanceESP-IDF
I want safety and robustnessRust (esp-idf-hal)
I am building a battery productESP-IDF (or Rust)
I want to teach someoneMicroPython

Tip: you do not have to choose forever. Many people start with Arduino and jump to ESP-IDF when the project demands it. The concepts (GPIO, I2C, tasks) carry over.

What matters more than the framework

  1. Understanding the hardware: ADC, reserved pins, power.
  2. Knowing how to debug: logs, printf, measuring signals.
  3. Reading the datasheet when something does not add up.

With that, switching frameworks is a weekend. Without it, none of them saves you.

Summary

  • Arduino: start fast. ESP-IDF: control and production. MicroPython: learn and prototype. Rust: robustness.
  • Lua is no longer worth it for new projects.
  • The current version of each is in the table above.
  • Choose by your experience and your goal, not by fashion.

Next step: let’s go into detail with the Arduino core, the most used one. Or go back to the series hub.

Related posts

↑↓ navigate ↵ open Esc close