#ip-address #local #ip #address #web #networking

bin+lib local-ip-addr

A simple library for getting the local IP address of the current host

2 releases

0.1.1 Jan 30, 2023
0.1.0 Jan 30, 2023

#122 in #address

Download history 11/week @ 2024-11-08 33/week @ 2024-11-15 37/week @ 2024-11-22 145/week @ 2024-11-29 131/week @ 2024-12-06 71/week @ 2024-12-13 69/week @ 2024-12-20 32/week @ 2024-12-27 37/week @ 2025-01-03 72/week @ 2025-01-10 110/week @ 2025-01-17 63/week @ 2025-01-24 41/week @ 2025-01-31 87/week @ 2025-02-07 78/week @ 2025-02-14

216 downloads per month
Used in 14 crates (4 directly)

MIT license

7KB

local-ip-addr

License: MIT

A simple library for getting the local IP address of the current host.

Usage

Add this to your Cargo.toml:

[dependencies]
local-ip-addr = "0.1"

Example

use local_ip_addr::get_local_ip_address;

fn main() {
    let ip_addr = get_local_ip_address().unwrap();
    println!("Local IP address: {}", ip_addr);
}

Dependencies

~375–620KB