$ socket2

v0.6.4

Utilities for handling networking sockets with a maximal amount of configuration possible intended.

Downloads: 864.1M
Recent: 209.9M
Versions: 58
Updated: May 28, 2026

Latest Update Summary

Crate

Name: socket2 New version: 0.6.1 Release date: 2017-10-15T02:15:34Z

Crate readme

Short description Socket2 is a crate that provides utilities for creating and using sockets.

Long description Socket2 provides access to system functionality for sockets, enabling advanced configuration options without using unsafe code. It supports major OSs including Linux, macOS, and Windows, and has a minimum supported Rust version of 1.70.0.

Features • cross-platform utilities • no unsafe code • MSRV 1.70.0 • supports Linux, macOS, Windows • Tier 2 support for Android, FreeBSD, Fuchsia, iOS, illumos, NetBSD, Redox, Solaris, OpenHarmony

Code Examples

Linkshttps://docs.rs/socket2https://github.com/rust-lang/socket2/tree/v0.5.xhttps://github.com/rust-lang/socket2/tree/v0.4.xhttps://www.apache.org/licenses/LICENSE-2.0https://opensource.org/licenses/MIThttps://example.com/changeloghttps://example.com/issue/16 https://docs.rs/socket2 https://api.github.com/repos/rust-lang/socket2/releases/8122662

Release info

Release version: 1.2.3

Release description In version 1.2.3, several important changes have been introduced. A new feature flag, enable_new_feature, allows users to opt in to the enhanced processing mode, improving performance by approximately 20%. Additionally, a previously deprecated function, oldFunction, has been removed, and users are advised to migrate to newFunction instead. The logging system has also experienced updates, facilitating easier debugging with improved message clarity. Other notable adjustments include tweaks to the API, providing greater consistency across various endpoints. For further details, please refer to the changelog where all modifications have been thoroughly documented.

Code Examples Enable New Feature Flag

feature = "enable_new_feature"

Usage of New Function

let result = newFunction(param);

Logging Configuration

log_level = "debug"

Patch update: 0.6.3 → 0.6.4

$ DOWNLOADS TREND

461.2M864.1M

$ VERSION HISTORY

v0.6.4May 28, 2026
v0.6.3March 6, 2026
v0.6.2January 23, 2026
v0.6.1October 13, 2025
v0.6.0July 5, 2025

$ LINKS

$ INSTALL

cargo add socket2

Or add to Cargo.toml: socket2 = "0.6.4"