NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #190 most downloaded on crates.io
Provides types and useful methods for working with IPv4 and IPv6 network addresses, commonly called IP prefixes. The new `IpNet`, `Ipv4Net`, and `Ipv6Net` types build on the existing `IpAddr`, `Ipv4Addr`, and `Ipv6Addr` types already provided in Rust's standard library and align to their design to stay consistent. The module also provides useful traits that extend `Ipv4Addr` and `Ipv6Addr` with methods for `Add`, `Sub`, `BitAnd`, and `BitOr` operations. The module only uses stable feature so it is guaranteed to compile using the stable toolchain.
Last release 1 months ago
06 Sep 2026
Release timing varies
gaps range from 4 weeks to 1.1 years
Some releases are documented
notes for 22 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
9 years old
72 releases · first in 2017
Fixes bug with IpNet::aggregate() where if a network containing u32::MAX-1 or u128::MAX-1 is provided, then u32::MAX and u128::MAX respectively are al
IpNet::aggregate() where if a network containing u32::MAX-1 or u128::MAX-1 is provided, then u32::MAX and u128::MAX respectively are always included in the output. See issue #71.Fixes bug where Ipv4Subnets(0.0.0.0, u32::MAX-1, 0) and Ipv6Subnets(::, u128::MAX-1, 0) incorrectly included u32::MAX and u128::MAX. See issue #70.
One column per quarter.
Backwards compatible schemars 1.* support using version specific features#67
Remove nightly features for no_std #58
ipnet-2.10.0 Rust crate has executable permission on source files. #59
Add new_assert implementations #57
Add ser_as_str feature to serialize using serialize_str() #52
Add no_std support on nightly #51
Inline constructors and field getters #48
Fix overflow in mask to prefix conversion #47
Allow to invoke some functions as const fn #43
Add IP netmask to prefix conversion functions and new with_netmask() constructors.
with_netmask() constructors.Nothing published for this version
Manually implement JsonSchema for IpNet, Ipv4Net, Ipv6Net #41 because default derived JsonSchema does not correspond to Serde representation #40
Add 'schemars' feature for deriving JSON schema #31
Merge Fix Error::description() deprecation warning #28.
Merge @imp's Default implementation. See #18. Ipv4Net and Ipv6Net now default to 0.0.0.0/0 and ::/0 respectively. IpNet defaults to the 0/0 Ipv4Net.
Merge @imp's Default implementation. See #18. Ipv4Net and Ipv6Net now default to 0.0.0.0/0 and ::/0 respectively. IpNet defaults to the 0/0 Ipv4Net.
Add #[allow(arithmetic_overflow)] for Ipv4AddrRange::count() and Ipv6AddrRange::count(). Since 1.43.0-nightly it gives a build error but this panic behavior is desired. In future it may be replaced with explicit use of panic!. See #21.
Implement From , From , and From for IpNet, Ipv4Net, and Ipv6Net respectively.
From<IpAddr>, From<Ipv4Addr>, and From<Ipv6Addr> for IpNet, Ipv4Net, and Ipv6Net respectively.Implement FusedIterator for IpAddrRange, Ipv4AddrRange, Ipv6AddrRange, IpSubnets, Ipv4Subnets, and Ipv6Subnets.
Implement FusedIterator for IpAddrRange, Ipv4AddrRange, Ipv6AddrRange, IpSubnets, Ipv4Subnets, and Ipv6Subnets.
Implement DoubleEndedIterator for IpAddrRange, Ipv4AddrRange, Ipv6AddrRange.
Implement custom count(), last(), max(), min(), nth(), and size_hint() for IpAddrRange, Ipv4AddrRange, Ipv6AddrRange.
Fix bug where IpAddrRange never ends when start and end are both 0 #11
Fix bug where IpAddrRange never ends when start and end are both 0 #11
Fix warning about missing 'dyn'
The Emu128 module has been removed. This provided an emulated 128-bit integer for supporting IPv6 addresses. As of Rust 1.26 the built-in 128-bit inte
The Emu128 module has been removed. This provided an emulated 128-bit integer for supporting IPv6 addresses. As of Rust 1.26 the built-in 128-bit integers have been marked stable and this library has been updated to use these instead of Emu128.
The with-serde feature name shim has been removed. The serde feature should now be used using the bare serde feature name per the Rust API Guidelines.
The Deref on Ipv4Net and Ipv6Net has been removed. This dereferenced to the Ipv4Addr and Ipv6Addr contained in the type. To use these methods call them directly on the contained IP address of interest, which may be accessed using the addr() or network() methods.
In prior versions it was necessary to use the Contains trait to access the contains() methods. These are now inherited in public methods on the IpNet, Ipv4Net, and Ipv6Net types so are always available.
The implementations of IpAdd<u32> and IpSub<u32> for IpAddr have been removed.
The implementations of IpAdd<u32> and IpSub<u32> for Ipv6Addr have been removed.
Nothing published for this version
Fix to resolve an issue with the optional serde support, where compact binary formats were not properly supported. See issue #10.
The previous release (1.1.0) introduced serde support using the feature name with-serde, but the Rust API Guidelines recommend using serde as the name
with-serde, but the Rust API Guidelines recommend using serde as the name of the feature. This release changes the feature name from with-serde to serde, but it is backwards compatible for those that already started using the with-serde feature name. The 1.1.0 release was yanked on crates.io to discourage further use of this feature name. See pull request #7.Adds serde support. See pull request #6.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →