I find it useful for the ESP to import the Arduino libraries as a component in the espressif toolchain. Saves a lot of time when I can just use the Arduino code for the stuff i'm too lazy for (ie handling ethernet) without compromising functionality.