I don't know if you mean from C, nim or pure Nim. I assume you are just talking about the protocol level stuff and not the rest? libwayland is the normal way to do it, I think. There are a couple nim repos you can find that wrap libwayland and some that have protocol implemented manually / partially. I have a macro system that generates protocol logic and object hierarchies for arbitrary wayland protocols but I made it for wayland clients and it is not public at the moment. To adapt it to a server you would have to make it generate event writers and request readers but that wouldn't be too crazy.