Skip to content

rarestype/swift-ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

115 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📍   swift-ip   📍

exchange strongly-typed values with zero overhead without falling back to raw integer representations or linking against large frameworks!

documentation · license

Requirements

The swift-ip library is a portable, Foundation-free library for working with IP addresses. It provides tools for parsing and formatting IP addresses, data structures for performing efficient IP address lookups, and shims for compatibility with types from other libraries such as SwiftNIO.

The swift-ip library requires Swift 6.0 or later. This is because IP.V6 uses UInt128.

Platform Status
💬 Documentation Status
🗝 Update Status
🐧 Linux Status
🍏 Darwin Status
🍏 Darwin (iOS) Status
🍏 Darwin (tvOS) Status
🍏 Darwin (visionOS) Status
🍏 Darwin (watchOS) Status
💝 Linux (aarch64) Status

Check deployment minimums

Why use swift-ip?

The IP address types defined by the Network framework are Darwin-only, which precludes their use in server-side code.

The swift-nio library provides a multi-platform SocketAddress type, but it is heap-allocated and reference-counted, and requires linking against the entire NIOCore module. This makes it unsuitable as a high-performance currency type for purposes such as firewall implementations or metrics collection.

Who is using swift-ip?

The Swiftinit documentation index currently uses the swift-ip library to verify clients such as Googlebot and GitHub Webhooks.

License

The swift-ip library is Apache 2.0 licensed.

Sponsor this project

 

Packages

 
 
 

Contributors