What is so great about Unix sockets that e.g. a normal TCP socket bound to localhost or even a named pipe can not do properly?
* You can use them for more than two processes communicating (eg. a server process with potentially multiple client processes connecting);
* They are bidirectional;
* They support passing kernel-verified UID / GID credentials between processes;
* They support passing file descriptors between processes;
* They support packet and sequenced packet modes.
TCP only grants you 2 of these extra features (sequenced packet mode/bidirection), leaving a giant hole in security in the process.
[0]: https://docs.rs/tokio/latest/tokio/net/struct.UnixStream.htm...