| Crates.io | local-ip-addr |
| lib.rs | local-ip-addr |
| version | 0.1.1 |
| created_at | 2023-01-30 08:47:41.840817+00 |
| updated_at | 2023-01-30 10:14:44.892378+00 |
| description | A simple library for getting the local IP address of the current host |
| homepage | |
| repository | https://github.com/tsirysndr/local-ip-addr |
| max_upload_size | |
| id | 771544 |
| size | 14,181 |
A simple library for getting the local IP address of the current host.
Add this to your Cargo.toml:
[dependencies]
local-ip-addr = "0.1"
use local_ip_addr::get_local_ip_address;
fn main() {
let ip_addr = get_local_ip_address().unwrap();
println!("Local IP address: {}", ip_addr);
}