For the ESP8266 see here.
Both ESP-IDF and the Arduino core are still very unstable, again (as with the ESP8266) with the Arduino core being seemingly more mature. (
Wire.begin() worked out of the box while Ⅰ couldn’t get
i2c_master_cmd_begin() to work properly.) This is especially true for the power management functions, so…
What doesn’t work?
Everything else. Modem sleep and light sleep allegedly exist and are supposed to be partially controlled by the RTOS, but in reality the power usage is as shown in the following image and Ⅰ didn’t find any code that would be able to make any difference:
Note that compared to the ESP8266 the Wifi hardware stays switched off until needed (good!), but pulse current and idle power is higher. This is probably because the CPU frequency is higher. The CPU frequency can be selected but it’s complicated (there’s no runtime API call, the firmware needs to be rebuilt) and completely unsupported in the Arduino core.