You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This only affects the no_std build, because in the std build, rustix's Ipv4Addr is just std::net::Ipv4Addr.
I think the reason I put these in rustix for the no_std build rather than just using a crate like no-std-net is to make it easier for the port of std to rustix. Using a crate as a dependency of std requires some trickery, and I'm still not sure if I'm doing it right in rustix, so I'm not confident in submitting changes to third-party crates to do it. If porting the code from std is straightforward, that might be the best approach for now.
This whole issue will hopefully go away in the future; rust-lang/rust#78802 hopefully opens up a path to moving these types into actual core, which should eliminate all these issues.
Activity
AsafFisher commentedon Sep 8, 2022
Maybe use
https://docs.rs/no-std-net/latest/no_std_net/struct.Ipv4Addr.html
?
sunfishcode commentedon Sep 8, 2022
This only affects the no_std build, because in the std build, rustix's
Ipv4Addris juststd::net::Ipv4Addr.I think the reason I put these in rustix for the no_std build rather than just using a crate like no-std-net is to make it easier for the port of std to rustix. Using a crate as a dependency of std requires some trickery, and I'm still not sure if I'm doing it right in rustix, so I'm not confident in submitting changes to third-party crates to do it. If porting the code from std is straightforward, that might be the best approach for now.
This whole issue will hopefully go away in the future; rust-lang/rust#78802 hopefully opens up a path to moving these types into actual core, which should eliminate all these issues.
sunfishcode commentedon Jan 24, 2025
This is now fixed, as rustix's no_std mode now uses the (relatively) new
core::net::Ipv4Addr, which supportsFromStr.