Skip to content

Release v0.6.0 #601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,70 @@
# 0.6.0

## Breaking changes

All IPv4 methods now have a `_v4` suffix, IPv6 uses `_v6`. TCP methods have a
`tcp_` prefix (looked better than a suffix).

Furthermore we removed all types from external libraries (i.e. libc or
windows-sys) from the public API, allowing us to update those without breaking
the API.

* Renamed `Socket::freebind_ipv6` to `freebind_v6`
(https://github.com/rust-lang/socket2/pull/592).
* Renamed `Socket::freebind` to `freebind_v4`
(https://github.com/rust-lang/socket2/pull/592).
* Renamed `Socket::original_dst` to `original_dst_v4`
(https://github.com/rust-lang/socket2/pull/592).
* Renamed `Socket::original_dst_ipv6` to `original_dst_v6`
(https://github.com/rust-lang/socket2/pull/592).
* Bump MSRV to 1.70
(https://github.com/rust-lang/socket2/pull/597).
* Use `c_int` from `std::ffi` instead of from libc
(https://github.com/rust-lang/socket2/pull/599,
https://github.com/rust-lang/socket2/pull/595).
* `SockAddr`'s methods now accept/return `SockAddrStorage` instead of
`sockaddr_storage`/`SOCKADDR_STORAGE`
(https://github.com/rust-lang/socket2/pull/576):
* `new`
* `try_init`
* `as_ptr`
* `as_storage`
* Add `SockFilter`, wrapper around `libc::sock_filter`, argument to
`Socket::attach_filter`
(https://github.com/rust-lang/socket2/pull/581).
* Various renames of TCP methods on `Socket`
(https://github.com/rust-lang/socket2/pull/592):
* `keepalive_time` -> `tcp_keepalive_time`
* `keepalive_interval` -> `tcp_keepalive_interval`
* `keepalive_retries` -> `tcp_keepalive_retries`
* `nodelay` -> `tcp_nodelay`
* `set_nodelay` -> `tcp_set_nodelay`
* `tcp_mss` -> `mss`
* `tcp_set_mss` -> `set_mss`
* `tcp_cork` -> `cork`
* `tcp_set_cork` -> `set_cork`
* `tcp_quickack` -> `quickack`
* `tcp_set_quickack` -> `set_quickack`
* `thin_linear_timeouts` -> `tcp_thin_linear_timeouts`.

## Non-breaking changes

* Added `Socket::(set_)priority`
(https://github.com/rust-lang/socket2/pull/588).
* Added TCP retries on Windows
(https://github.com/rust-lang/socket2/pull/557).
* Added `SockAddrStorage`, wrapper around `sockaddr_storage`/`SOCKADDR_STORAGE`
for usage with `SockAddr` (instead of the types from libc/windows-sys)
(https://github.com/rust-lang/socket2/pull/576).
* Implemented `Socket::bind_device_by_index_{v4,v6}` on Android and Linux
(https://github.com/rust-lang/socket2/pull/572).
* Implemented `Copy` and `Clone` for `InterfaceIndexOrAddress`
(https://github.com/rust-lang/socket2/pull/571).
* Updated to Windows-sys v0.59
(https://github.com/rust-lang/socket2/pull/579).
* We now use `OwnedFd`/`OwnedSocket` internally for `Socket`
(https://github.com/rust-lang/socket2/pull/600).

# 0.5.10

* Add cygwin support
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[package]
name = "socket2"
version = "0.6.0"
publish = false # In development.
authors = [
"Alex Crichton <[email protected]>",
"Thomas de Zeeuw <[email protected]>"
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ See the [API documentation] for more.

# Branches

Currently Socket2 supports two versions: v0.5 and v0.4. Version 0.5 is being
developed in the master branch. Version 0.4 is developed in the [v0.4.x branch]
branch.
Currently Socket2 supports the following versions:
* v0.6 developed in the master branch
* v0.5 developed in the [v0.5.x branch]
* v0.4 developed in the [v0.4.x branch]

[v0.5.x branch]: https://github.com/rust-lang/socket2/tree/v0.5.x
[v0.4.x branch]: https://github.com/rust-lang/socket2/tree/v0.4.x

# OS support
Expand All @@ -33,10 +35,7 @@ Socket2 attempts to support the same OS/architectures as Rust does, see
https://doc.rust-lang.org/nightly/rustc/platform-support.html. However this is
not always possible, below is current list of support OSs.

*If your favorite OS is not on the list consider contributing it! See [issue
#78].*

[issue #78]: https://github.com/rust-lang/socket2/issues/78
*If your favorite OS is not on the list consider contributing it!*

### Tier 1

Expand Down