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

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

#104 in #address

Download history 26/week @ 2023-12-06 46/week @ 2023-12-13 51/week @ 2023-12-20 33/week @ 2023-12-27 17/week @ 2024-01-03 54/week @ 2024-01-10 38/week @ 2024-01-17 25/week @ 2024-01-24 29/week @ 2024-01-31 37/week @ 2024-02-07 67/week @ 2024-02-14 56/week @ 2024-02-21 74/week @ 2024-02-28 60/week @ 2024-03-06 46/week @ 2024-03-13 89/week @ 2024-03-20

289 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

~350–590KB