6 releases
Uses new Rust 2024
| new 0.5.0+api-spec-0… | May 11, 2026 |
|---|---|
| 0.4.0+api-spec-0… | May 4, 2026 |
| 0.3.3 | Jun 20, 2025 |
| 0.3.0 | Apr 11, 2025 |
#86 in HTTP client
3,880 downloads per month
110KB
2.5K
SLoC
cloud-hypervisor-client
Unofficial Rust crate for interacting with the cloud-hypervisor REST API
Overview
The cloud-hypervisor-client crate can be used for managing the endpoints provided by a cloud-hypervisor socket in your
Rust project.
The API client code of this crate has been auto-generated from the OpenAPI description for the cloud-hypervisor REST API using OpenAPI Generator.
Installation
Add the crate to your project with Cargo:
cargo add cloud-hypervisor-client
Or add it to your Cargo.toml manually:
[dependencies]
cloud-hypervisor-client = "0.5.0+api-spec-0.3.0-2026-05-11"
The crate targets a local cloud-hypervisor VMM over a Unix domain socket via hyper and hyperlocal, so it
only works on Unix-like systems.
Example
A very basic example for listing all existing servers:
use cloud_hypervisor_client::apis::DefaultApi;
use cloud_hypervisor_client::socket_based_api_client;
#[tokio::main]
async fn main() -> Result<(), String> {
let client = socket_based_api_client("cloud_hypervisor_vm_socket.sock");
let vm_info = client
.vm_info_get()
.await
.map_err(|err| format!("API call to vm_info_get failed: {:?}", err))?;
println!("Received vm info: {vm_info:?}");
Ok(())
}
For more examples check out the examples folder in the Git repository.
Minimum Supported Rust Version (MSRV)
This crate's MSRV is 1.86.0.
Attributions
This crate was based on the great work done in: https://github.com/HenningHolmDE/hcloud-rust.
Dependencies
~13–20MB
~278K SLoC