> First step would be implementing support for it in the selectors module. > Mostly just need an implementation for these functions, but in practice you > can get away without implementing all of them: > <https://github.com/nim-lang/Nim/blob/devel/lib/pure/selectors.nim#L46-L230>.
Oh nice, `selectors` already work for networking events. I'll look into adding support for timers! I'm not familiar with Nim's async and adding custom user driven events. That's what I'd need to async wrap events on the esp32. > Once you add support there things should just work. Of course, you'll still > need to figure out if you can wrangle ARC for your use case. I am playing > with embedded devices nowadays myself, so this might be the motivation I need > to figure out a solution here. But to be honest, for my use cases wrapping > the standard ESP libraries is enough (HTTP server is all I need). Well `asynchttp` does work with ORC pretty well out-of-the-box! For most cases, ORC is probably fine as @Araq notes. I'd recommend `asynchttp` over the ESP http library. It's much nicer, there's an example in [simplewifi](https://github.com/elcritch/nesper/blob/master/esp-idf-examples/simplewifi/main/server.nim). Though I haven't looked into TLS yet. I'm hoping there's some Nim libraries for that, as the C based ones are beasts.