host-identity 1.1.1

Stable, collision-resistant host identity resolution across platforms, container runtimes, cloud providers, and Kubernetes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Minimal example: resolve a host ID using the platform default chain.
//!
//! ```bash
//! cargo run --example basic
//! ```

fn main() -> Result<(), host_identity::Error> {
    let id = host_identity::resolve()?;

    println!("uuid:    {id}");
    println!("summary: {}", id.summary());
    println!("source:  {}", id.source());
    println!("in_container: {}", id.in_container());

    Ok(())
}