Both nix crate and socket2 crate provides APIs for Unix socket programming. I started with socket2 but had to import nix to find all local IPs ( getifaddrs()). But it also introduces some confusion, for example both has SockAddr type.
I'm curious how others use these two crates? Do you use both at the same time? Thanks.
Eventually I went with nix crate only. It uses RawFd for socket abstraction but that's okay. The good thing is that it covers most of the standard socket API as it wraps libc.