Skip to content

Add FreeBSD support using mDNSResponder/Bonjour backend #87

@sandronoel

Description

@sandronoel

Hello! Thank you for maintaining this excellent library. I've been using zeroconf on Linux and macOS with great success, and it's been significantly more reliable than alternatives.

I'm currently trying to deploy a server application on FreeBSD 15, and I've run into compilation errors because FreeBSD isn't recognized as a supported platform. However, FreeBSD does support mDNS through the mDNSResponder package (the same Bonjour implementation used on macOS).

The fix appears to be relatively straightforward - adding target_os = "freebsd" to the conditional compilation checks that currently only check for target_vendor = "apple" or target_vendor = "pc". Specifically, in src/lib.rs:

Since FreeBSD uses the same Bonjour/mDNSResponder API as macOS, the existing BonjourEventLoop and BonjourTxtRecord implementations should work without any additional changes.

Would you be open to adding FreeBSD support? I'd be happy to test a PR. FreeBSD is commonly used for servers and networking applications, so I believe this would benefit other users as well.

Thanks again for your work on this project!

Sandro.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions