Are there any socket or net libraries for Rust? The net
page in the standard library documentation seems to only include address-related functions.

- 12,111
- 21
- 91
- 136

- 112,946
- 110
- 377
- 526
-
There is an issue for this https://github.com/mozilla/rust/issues/1828 – LennyStackOverflow Feb 15 '12 at 11:20
-
2Are the answers in this question still current ? – static_rtti Jun 13 '15 at 13:55
-
@static_rtti, Probably no. – Vi. Dec 28 '15 at 15:50
3 Answers
The std::net exists for working with sockets.

- 120,085
- 34
- 287
- 296

- 819
- 10
- 8
-
1@RüdigerHerrmann, this does provide an answer. Since the question was asked, sockets support was added to `std::net` module in the standard library. – Vladimir Matveev Oct 06 '15 at 08:24
There is also a bsd socket library in cargo, which you can install with:
$ cargo install socket
I haven't tried it out yet though. Or if you want to use zeromq, you could use my bindings. You'll need to be using rust's HEAD version though, as it's using code that was added after the rust 0.1 release. Feel free to ping me on irc.mozilla.org's #rust channel if you need any help. I'm erickt there.

- 104
- 1
- 2
You can try UnixListener from the tokio crate.
This crate provides bindings between mio_uds, the mio crate for Unix Domain sockets, and futures. The APIs and bindings in this crate are very similar to the TCP and UDP bindings in the futures-mio crate. This crate is also an empty crate on Windows, as Unix Domain Sockets are Unix-specific.