#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

#101 in #address

Download history 7/week @ 2024-01-01 53/week @ 2024-01-08 42/week @ 2024-01-15 23/week @ 2024-01-22 26/week @ 2024-01-29 39/week @ 2024-02-05 64/week @ 2024-02-12 42/week @ 2024-02-19 95/week @ 2024-02-26 51/week @ 2024-03-04 49/week @ 2024-03-11 78/week @ 2024-03-18 106/week @ 2024-03-25 126/week @ 2024-04-01 52/week @ 2024-04-08 60/week @ 2024-04-15

356 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