No IpAddr in Core

I'm trying to use IP addresses in a no_std crate. I was hoping core will have the IpAddr type, but it doesn't :frowning:. What options do I have other than writing it myself? Shouldn't this type be part of core ideally?

1 Like

IpAddrV4 and IpAddrV6 are direct wrappers over libc's sockaddr_in and sockaddr_in6 types, respectively, and core doesn't pull in libc.


Thanks @sfackler

I hope that eventually the changes being done by the portability WG might allow having a pure-Rust IpAddrV4/6 implementation for non-libc targets. (I'm surprised to see that Redox uses the libc based implementation, I didn't think it used libc).