windy1 / zeroconf-rs

zeroconf is a cross-platform library that wraps underlying ZeroConf/mDNS implementations such as Bonjour or Avahi, providing an easy and idiomatic way to both register and browse services.
MIT License
77 stars 25 forks source link

Add Windows Support #42

Closed davidcorrigan714 closed 9 months ago

davidcorrigan714 commented 10 months ago

Follow up to my bonjour-sys PR for windows support. Might as well get both going to address any feedback.

Mostly the code needed some tweaks here and there for windows specific socket calls and it seems to work fine otherwise. The service & browser examples run. It's a bit odd that there's now windows code in the macos folder but also seemed like a good chunk of refactoring or renaming to clean that up though it could be done. I haven't done any thorough testing beyond that but will probably set this branch as a git dependency on the personal project I want this for and kick the tires a bit more this week across all 3 platforms.

windy1 commented 10 months ago

Hey there! 👋

Thanks so much for submitting this. The changes looks good to me. I'm away this weekend and don't have access to a Windows machine right now so before I merge I would just like to verify the changes myself.

I agree the directory naming is weird; I was planning on renaming them to bonjour and avahi instead when I eventually got around to Windows support. If you would like to include those changes in this PR or create a subsequent PR I would be happy to accept. I think I would likely want to rename these directories before another release goes out anyways.

davidcorrigan714 commented 10 months ago

Missed that there's a workflow for this too, I'll add windows to that too.

davidcorrigan714 commented 10 months ago

Updated for the folder renames, windows builds, & some clippy updates.

davidcorrigan714 commented 10 months ago

Looks like the lock file is a bit off from building against my branch but that's not really fixable until the update to bonjour-sys is in.