Decision Workspace
prefixset vs ipnet vs prefix-trie
Side-by-side comparison of Rust crates
An efficient set container for IP address prefixes
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.
Prefix trie (tree) datastructure (both a set and a map) that provides exact and longest-prefix matches.
Core Metrics
| prefixset | ipnet | prefix-trie | |
|---|---|---|---|
| Health Score | 34 | 72 | 67 |
| Total Downloads | 3.8K | 345.0M | 2.1M |
| 30d Downloads | 4 | 26.1M | 271.4K |
| Dependents | 3 | 4.7K | 154 |
| Releases | 2 | 70 | 17 |
| Last Updated | 1678d ago | 25d ago | 5d ago |
| Age | 4y 7m | 8y 7m | 3y 2m |
Health Breakdown
Technical Details
| prefixset | ipnet | prefix-trie | |
|---|---|---|---|
| Version | 0.1.0-rc.2 | 2.12.0 | 0.8.2 |
| Stable (≥1.0) | ✗ No | ✓ Yes | ✗ No |
| License | MIT | MIT OR Apache-2.0 | MIT OR Apache-2.0 |
| Dependencies | 7 | 5 | 16 |
| Crate Size | 9.7MB | 31KB | 81KB |
| Features | 0 | 9 | 5 |
| Yanked % | 0.0% | 1.4% | 0.0% |
| Edition | 2018 | 2018 | 2021 |
| MSRV | — | — | 1.71.1 |
| Owners | 1 | 1 | 1 |
Links
Quick Verdict
- •ipnet leads with a health score of 72/100, but none of the options score above 80.
- •ipnet is depended on by 4.7K crates — strongest ecosystem trust.
- •⚠ prefixset has not been updated in over a year.
- •prefixset, prefix-trie are pre-1.0 — API may change.