Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type-safe mDNS wrapper? #449

Closed
victorbnl opened this issue Jul 11, 2024 · 6 comments
Closed

Type-safe mDNS wrapper? #449

victorbnl opened this issue Jul 11, 2024 · 6 comments

Comments

@victorbnl
Copy link

I’ve seen in other issues that the common way to use mDNS is to add the espressif/mdns component using esp-idf-sys. But I reckon doing this provides a raw binding, without types? Is an mDNS wrapper of that component planned?

@victorbnl
Copy link
Author

After re-reading #343 (comment) I understand that adding the remote espressif/mdns automatically makes available a type-safe wrapper in esp-idf-svc, am I right? I think there should be an example with a comment explaining that, or more documentation about it.

@Vollbrecht
Copy link
Collaborator

yes you can find them in the mdns.rs file. Previously mdns was directly part inside the esp-idf repository. Since ESP-IDFv5 they moved it out into a external component. You should only need to add the component and than can use the api out of mdns.rs.

How to add remote components is described in the esp-idf-sys build-options with a concrete example for mdns

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Jul 11, 2024
@victorbnl
Copy link
Author

Don’t you think there should be some documentation for esp_idf_svc::mdns though? I know I can easily find what I want in the source code given it is a very simple module, but it is still far from ideal.

@Vollbrecht
Copy link
Collaborator

Vollbrecht commented Jul 11, 2024

Well documentation on the module can be improved, no doubt. Though your question was about if there

a) exist such a wrapper -> yes it does exist, i mention it.
b) does a general doc exist how to do it -> yes it does i linked to it.

If you want to further improve it fell free to create a PR that add some doc's to the module itself. Such a thing is always welcome.

@victorbnl
Copy link
Author

Yes my question was that initially but now I have my answer! Actually I am currently writing my first project in Rust so I’m very new to the language, but I’ll definitely try to look into contributing.

@Vollbrecht
Copy link
Collaborator

Yes my question was that initially but now I have my answer! Actually I am currently writing my first project in Rust so I’m very new to the language, but I’ll definitely try to look into contributing.

Our docs can be improved for sure though that is a more general problem. The project is currently completely community driven and in most cases thinks happen if people want specific stuff and like to share it. As its no fun to implement something, that one self is not using.

For quick questions i can recommend you to join the matrix chat. Contributing can have all sorts of form and everything is welcome ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants