Open cbeck88 opened 4 years ago
The crate relies on several items from std::net
.
I see, thanks
Are there any other blockers to this besides std::net::{Ipv4Addr, Ipv6Addr}
and the SocketAddr
thing? I understand that in rust std these have different representations on different OS's, and probably need to be in std. But it seems in principle we should be able to parse IPv4 and IPv6 objects without using platform specific code. I'm trying to scope out what would likely be the biggest difficulty.
In theory we could remove DNS resolution support and use custom types to represent IP addresses. B both would be breaking changes, and upgrading the ecosystem to a semver-incompatible version of the url
crate takes significant effort.
Wow, I didn't realize it does DNS resolution support as well -- I guess I don't know the full scope of this library. Thank you!
@garbageslam Do you have specific features from this crate that you're interested in? I'm working on making my redesign of the uri
crate no_std
, and it'd be great to know what would be useful for you ^^
@Plecra hi -- I think the specific features are,
FromStr
, with a standards conforming implementation,.as_str()
or ToString
I could give you links to show how we are using it right now, but it's probably TMI
Perhaps progress can be made once this issue is resolved?
Could the features that require std
be placed behind a feature gate?
I see some very interesting progress with core::net
in 1.77 and core::error::Error
in 1.81.
Hi. I have a patch that completes the no_std conversion for the url crate. Some implementation details:
url::Url::socket_addrs()
, url::Url::from_file_path()
, url::Url::from_directory_path()
, and url::Url::to_file_path()
.Should I submit a PR to this repository? Feedback would be much appreciated. You can see a draft of the changes over here: https://github.com/mspiegel/rust-url/pull/1/files
There's an existing PR for this, see https://github.com/servo/rust-url/pull/831. The current biggest issue is that it's a breaking change, see https://github.com/servo/rust-url/pull/831#discussion_r1434761298
Would you be interested in patches to make the
url
library support ano_std
build configuration based on the alloc crate instead? I think it should be possible and will make the library more easily portable.