{"id":13587169,"url":"https://github.com/AstroHQ/astro-dnssd","last_synced_at":"2025-04-07T19:30:54.026Z","repository":{"id":48098862,"uuid":"163091296","full_name":"AstroHQ/astro-dnssd","owner":"AstroHQ","description":"Simple Rust wrapper around DNS-SD","archived":false,"fork":false,"pushed_at":"2025-01-27T17:55:35.000Z","size":141,"stargazers_count":23,"open_issues_count":8,"forks_count":5,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-03-31T03:11:46.718Z","etag":null,"topics":["dns-sd","rust","rust-wrapper"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AstroHQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-25T14:55:54.000Z","updated_at":"2025-01-27T17:51:11.000Z","dependencies_parsed_at":"2024-08-01T16:43:15.537Z","dependency_job_id":null,"html_url":"https://github.com/AstroHQ/astro-dnssd","commit_stats":{"total_commits":84,"total_committers":6,"mean_commits":14.0,"dds":"0.48809523809523814","last_synced_commit":"c5b3d6957cb5b4f63d841fa1f20808d758a7c583"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AstroHQ%2Fastro-dnssd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AstroHQ%2Fastro-dnssd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AstroHQ%2Fastro-dnssd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AstroHQ%2Fastro-dnssd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AstroHQ","download_url":"https://codeload.github.com/AstroHQ/astro-dnssd/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247716111,"owners_count":20984174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns-sd","rust","rust-wrapper"],"created_at":"2024-08-01T15:06:03.704Z","updated_at":"2025-04-07T19:30:53.401Z","avatar_url":"https://github.com/AstroHQ.png","language":"Rust","readme":"# Astro DNS-SD\n\n[![Build Status](https://dev.azure.com/AstroHQ/astro-dnssd/_apis/build/status/AstroHQ.astro-dnssd?branchName=master)](https://dev.azure.com/AstroHQ/astro-dnssd/_build/latest?definitionId=1\u0026branchName=master)\n[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](https://github.com/AstroHQ/astro-dnssd)\n[![Cargo](https://img.shields.io/crates/v/astro-dnssd.svg)](https://crates.io/crates/astro-dnssd)\n[![Documentation](https://docs.rs/astro-dnssd/badge.svg)](https://docs.rs/astro-dnssd)\n\nMinimal but friendly safe wrapper around dns-sd(Bonjour, mDNS, Zeroconf DNS) APIs.\n\n[Documentation](https://crates.io/crates/astro-dnssd)\n\n## Features\n\n### Complete\n\n- Service registration\n- TXTRecord support for service registration via HashMap\n- Service browsing\n\n### Todo\n\n- Record creation\n- Name resolution\n- Port map\n- Tests\n- Documentation\n\n## Build Requirements\n`astro-dnssd` requires the Bonjour SDK (as of 0.3 on windows, it's optional, see win-bonjour feature flag)\n\n- **Windows:** Download the SDK [here]( https://developer.apple.com/bonjour/)\n- **Linux:** Install `avahi-compat-libdns_sd` for your distro of choice.\n\n## Technical Background\nThis [website](http://www.dns-sd.org/) provides a good overview of the DNS-SD protocol.\n\n## Example\n\n```rust\nuse astro_dnssd::DNSServiceBuilder;\nuse env_logger::Env;\nuse std::thread::sleep;\nuse std::time::Duration;\n\nfn main() {\n    env_logger::from_env(Env::default().default_filter_or(\"trace\")).init();\n    println!(\"Registering service...\");\n    let service = DNSServiceBuilder::new(\"_http._tcp\", 8080)\n        .with_key_value(\"status\".into(), \"open\".into())\n        .register();\n\n    {\n        match service {\n            Ok(service) =\u003e {\n                println!(\"Registered... waiting 20s\");\n                sleep(Duration::from_secs(20));\n                println!(\"Dropping... {:?}\", service);\n            }\n            Err(e) =\u003e {\n                println!(\"Error registering: {:?}\", e);\n            }\n        }\n    }\n    log::info!(\"Drop should have happened\");\n    sleep(Duration::from_secs(5));\n}\n\n```\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0\n   ([LICENSE-APACHE](LICENSE-APACHE) or [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0))\n- MIT license\n   ([LICENSE-MIT](LICENSE-MIT) or [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT))\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAstroHQ%2Fastro-dnssd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAstroHQ%2Fastro-dnssd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAstroHQ%2Fastro-dnssd/lists"}