2 releases
0.1.1 | Jan 30, 2023 |
---|---|
0.1.0 | Jan 30, 2023 |
#89 in #network
183 downloads per month
Used in 14 crates
(4 directly)
7KB
local-ip-addr
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
~365–610KB