I started writing that actually, but there was no WebSocket client, so I had to write one from scratch. It kinda worked, but was probably too awful so I felt ashamed.

After that I didn't know how connect to multiple relays at the same time without using multiple threads, so I gave up until someone made that easier for me. What is the correct way to do that type of concurrency on Zig?

Reply to this note

Please Login to reply.

Discussion

I'm still a zig noob and this seems like the answer. Async/await was deprecated from language. I was trying to implement nostr client / relay but got stuck on concurrency as well! I'll figure it out eventually.

One would think a simple semaphore would be enough for must stuff that we are trying

Cool! You guys are thinking about Nostr in Zig. Please don't forget about Wasm support when you do that.