@araq, that's great! I was hoping to do a PR, but wasn't sure if there would be interest. It seems, LwIP and FreeRTOS support could be split. Most of what I've done is actually port Nim sockets to LwIP. That'd mean it'd be easy to combine Nim & LwIP on many embedded devices.
Once I get networking tested I'll create a PR. Would appreciate a code review! There are lots of areas of Nim & FreeRTOS I'm not familiar with. Not really sure how to do the CI, but it'd be great. There is QEMU support for the ESP32.