-
Notifications
You must be signed in to change notification settings - Fork 43
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
Feature Request: Extract dns_parser.rs as stand-alone crate. #282
Comments
I didn't realize that the dns_parser file itself is useful for others. Thanks for raising this issue! Usually I'd like to have related things built together with less dependencies, but let me think a bit more about this. And for my curiosity, may I ask what socket/networking crate do you use for wasm targets? (or did you roll your own for sockets?) |
Thanks. I'm not using any crate. Yes, I'm writing my own unsafe ffi bindings for the socket system calls. |
Cool! I thought about it and I think it's worth doing it. I'll give it a shot this weekend and get back to you. |
Thanks. |
I posted the first version of a PR #284 for this. I think there are quite a bit more details to iron out, but would you please give it a try (using the PR's branch) to see if it would work for your use case? Any comments are appreciated. EDIT: and one particular thing I wanted to do is: keep the public API surface of the new crate as small as possible (at this initial moment), as long as it can provide service to |
I have checked. It looks good to me. Just one nitpick comment. I was also able to use the newly extracted mdns-parser, so the exposed public APIs are sufficient for my need. |
Thanks! I've rebased this patch to the latest release 0.13.0 and addressed comments. I will get the diff ready for merging and publishing the new crate, and I plan to do it in a new release specific for this. |
When is the release is likely going to be? i.e when the extracted crate will be available on crate.io. |
I plan to publish it this week. |
Alright thanks. |
The extracted crate is published :) at https://crates.io/crates/mdns-parser Let me know if any issues, cheers! |
I've tried the crate directly, all good. Thanks for prompt response. |
A heads-up, after some time, this change didn't feel right to me. I've opened a new PR #297 to rolllback. Sorry about that. Please feel free to fork or create a new crate with this parser code if you see fit. |
I have a use-case for a tiny DNS client (service-discovery only) for some wasm targets. The problem is that the socket-related libraries (Socket2, if-addrs) used by this crate can't be compiled to those wasm targets yet. i.e Those libraries simply don't have the system call bindings for the targets. As a result of this, I'm just using the the DNS parser utility file from this crate.
I thought the dns parser utility is useful enough to stand alone as an independent crate.
An easier alternative would to just make this "mdns-sd" crate expose the dns_parser.rs file publicly, but again, other crates that depend on mdns-sd just for the dns parsing functionality would still need to be able to compile Socket2 and if-addrs.
So the request to extract dns_parser.rs as stand-alone crate. I'm also available to work on this if needed, but most importantly, I wanted to hear your opinion on it.
The text was updated successfully, but these errors were encountered: