<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Cradicle Explorer</title>
    <link href="/css/bootstrap/bootstrap.min.css" rel="stylesheet">
    <style>
      .form-control-dark::placeholder {
          color: #aaa;
          opacity: 1;
      }
    </style>
    <link rel="stylesheet" href="/assets/fontawesome/css/all.min.css">
    <link rel="icon" type="image/png" href="/favicon.png">


                <link href="/css/dashboard.css" rel="stylesheet">
                </head>
                <body>
                <header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
                  <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3 fs-6" href="/">Cradicle Explorer</a>
                  <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                  </button>
                  <form method="get" action="/cgi-bin/main" style="width:100%;"><input class="form-control form-control-dark w-100 rounded-0 border-0" type="text" name="q" placeholder="Search repos" aria-label="Search"></form>
                  <div class="navbar-nav flex-row">
                    <div class="nav-item text-nowrap">
                      <a class="nav-link px-3 active" href="/cgi-bin/repo?id=z4LBUV7pj8L2P981nGLKNA7vqLmTy">host_discovery</a>
                    </div>
                  </div>
                </header>
                <div class="container-fluid">
                  <div class="row">
                    <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-dark sidebar collapse">
                      <div class="position-sticky pt-3 sidebar-sticky">
                        <ul class="nav flex-column">
                          <li class="nav-item">
                            <a class="nav-link active" href="/cgi-bin/repo?id=z4LBUV7pj8L2P981nGLKNA7vqLmTy">
                              <i class="align-text-bottom fa-solid fa-info"></i>
                              Info
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z4LBUV7pj8L2P981nGLKNA7vqLmTy&issue=list">
                              <i class="align-text-bottom fa-solid fa-layer-group"></i>
                              Issues
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z4LBUV7pj8L2P981nGLKNA7vqLmTy&patch=list">
                              <i class="align-text-bottom fa-solid fa-vest-patches"></i>
                              Patches
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z4LBUV7pj8L2P981nGLKNA7vqLmTy&wallet=list">
                              <i class="align-text-bottom fa-solid fa-wallet"></i>
                              Wallets
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z4LBUV7pj8L2P981nGLKNA7vqLmTy&source=.">
                              <i class="align-text-bottom fa-solid fa-code"></i>
                              Source
                            </a>
                          </li>
                        <h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted text-uppercase">
                          <span></span>
                        </h6>
                        <ul class="nav flex-column mb-2">
                        
                        </ul>
                      </div>
                    </nav>
                <main class="col-md-9 ms-sm-auto col-lg-10">
                  <div class="container px-1 py-3">
        

    <div class="list-group">
    <div class="list-group-item">
    <div style="font-size:1.3rem;">host_discovery</div>
    <div class="repo-item">A simple Rust crate for host discovery</div>
    <div>rad:z4LBUV7pj8L2P981nGLKNA7vqLmTy</div>
    </div>
    <div class="list-group-item">
    <div>Visibility</div>
    <div class="repo-item">public</div>
    </div>
    <div class="list-group-item">
    <div>Delegates</div><div class="repo-item">did:key:z6MkqYFUVfd721jPacv8JgjbcFADDVj13koNoxTLjgeHcMkk</div>
    </div>
    <div class="list-group-item">
    <div>Default branch</div>
    <div><span class="repo-item">trunk &#8594 d4527288020ae73d681e2d18a170032e3be93541</span> (Thu Mar  7 14:35:29 2024)</div>
    </div>
    <div class="list-group-item">
    <div>Threshold</div>
    <div class="repo-item">1</div>
    </div>
    </div>
    
        <div class="list-group mt-3">
        <div class="list-group-item">
        <div class="mb-2" style="font-weight:bold;"><i class="fa-solid fa-book"></i> README.md</div>
        <pre style="margin:0; font-size:0.85rem; overflow-x:auto; color:#fafafa;">&gt; ***Disclaimer*** This project has been deprecated in favor of [Whoami](https://github.com/ardaku/whoami)

- Whoami is ultimately the better implementation of this functionality, and as a result I see no reason to continue maintaining this repo.
- This codebase will continue to exist as a public archive.

# A simple Rust crate for host discovery

&gt; Make more decisions based on the characteristics of the environment your code runs in.

- Basic Usage

```rust
use host_discovery::{Environment, CrossPlatform, LinuxSystem};

fn main() {
    let env = Environment::new();
    
    let os = env.get_os();
    let distro = env.get_distro();
    let arch = env.get_arch();
    println!(&quot;OS: {}, Linux Distribution: {}, Arch: {}&quot;, os, distro, arch);
}
```

- API Methods
&gt; ***trait*** `CrossPlatform`
  
  - ***fn*** `get_os`: Returns a variant of OperatingSystem
  - ***fn*** `get_arch`: Returns a variant of Architecture
  - ***fn*** `get_cpu_cores`: Returns a u32 representing the number of physical cores on the CPU
  - ***fn*** `get_gpu_model`: Returns an optional String `Option&lt;String&gt;` containing the GPU model
  - ***fn*** `get_public_ip`: Returns String containing the public ip address
&gt; ***trait*** `LinuxSystem`

  - ***fn*** `cpuinfo_model`: Returns a String containing the name of the CPU model
  - ***fn*** `get_distro`: Returns a String containing the name of the running Linux distribution
  - ***fn*** `get_cpe_name`: Returns a String containing the common platform enum
  - ***fn*** `get_hostname`: Returns a String containing the hostname of the machine
  - ***fn*** `is_subsystem_env`: Returns a boolean based on whether the Linux environment is a Windows subsystem
&gt; ***trait*** `WindowsSystem`

  - ***fn*** `get_edition`: Returns a String containing the Windows edition via the registry
  - ***fn*** `get_win_hostname`: Returns a String containing the hostname of the machine
  - ***fn*** `get_cpu_model`: Returns a String containing the CPU model via the Windows registry
    
### Add to your project
```sh 
    cargo add host_discovery
```

&gt; Planned Features

- API redesign to improve ergonomics and DRYness 
- Extended device detection (CPU, etc.).
- FreeBSD, MacOS, and extended Windows support

&gt; ***If you experience any bugs, please don&#x27;t hesitate to create an issue; so they may be fixed in a timely fashion.***

</pre>
        </div>
        </div>

</div>
</main>
</div>
</div>


</body>
</html>

