Crates.io | hcs-rs |
lib.rs | hcs-rs |
version | 0.9.1 |
source | src |
created_at | 2019-01-08 23:17:18.335052 |
updated_at | 2020-01-06 20:17:43.993309 |
description | Rust abstractions for HCS APIs. |
homepage | |
repository | https://github.com/rafawo/hcs-rs |
max_upload_size | |
id | 107526 |
size | 322,070 |
Rust wrapper of Host Compute Service API
This project is a collection of Rust libraries that wrap functionality exposed by the Host Compute Service.
HCS (Host Compute Service for short) APIs are part of the Windows 10 SDK.
Public documentation for the HCS is yet to be released.
For this wrapper to build properly, the following requirements need to be met by the building machine:
19h1
.Note: This section includes the paths in the Windows SDK for the header and lib files based on the default installation path c:\Program Files (x86)\Windows Kits\10
.
Note: This section shows paths specific to Windows SDK version 10.0.18362.0
The relevant Windows 10 SDK files that this project is wrapping are:
All of the above are serviced through the Windows Service Host Compute Service
, from executable C:\Windows\System32\vmcompute.exe.
The C bindings in this crate will remain private and not public to external code. Only the Rust idiomatic wrappers are exposed.
The following table describes the relevant Windows 10 SDK files that this project is wrapping and how they relate to each module:
hcs-rs file | Overview | HCS API C Header file | .h path in SDK | .lib path in SDK |
---|---|---|---|---|
computedefs | Types and definitions used by the HCS APIs. | computedefs.h | C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\computedefs.h | C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64\computedefs.lib |
computecore | APIs for the core HCS functionality to manage compute systems. | computecore.h | C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\computecore.h | C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64\computecore.lib |
computenetwork | Types definitions and APIs to interact with the HCN (Host Compute Network). | computenetwork.h | C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\computenetwork.h | C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64\computenetwork.lib |
computestorage | APIs for the HCS storage management. | computestorage.h | C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\computestorage.h | C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64\computestorage.lib |
hypervdevicevirtualization | Types definitions and APIs for device emulation/virtualization. | hypervdevicevirtualization.h | C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\hypervdevicevirtualization.h | C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64\vmdevicehost.lib |
Feature | Notes |
---|---|
bindings |
By default, the raw C bindings to the SDK APIs are private to the crate. Using feature bindings makes them public for consumption on client code |
schema |
Includes all HCS/HCN schema JSON object model |
19h1 |
By default, the project has compatibility with RS5. Using feature 19h1 adds 19H1 specific updates to the APIs |
utilities |
Includes utility code that provides more Rust abstractions on top of the basic safe wrappers of the C bindings. By default, this crate only exposes the safe wrappers |
NOTE: All versions from 0.2.1 and below have been yanked on purpose. Please use the git repo directly for latest active changes, or 0.2.2 as the oldest "stable" version.
This section briefly describes all published crates.io versions of this project, ordered from latest to oldest.
HdvPciDevice
HdvPciDeviceBase::hook_device_interface_callbacks
now expects parameter device
to be a immutable reference instead of it being moved. This to ensure callers do not mistakenly drop the only reference to the device
instance they might haveHdvHost::hook_device_interface_callbacks
set_callback
functions are no longer unsafe
HdvPciDeviceBase::hook_device_interface_callbacks
now expects parameter device
to be moved instead of a mutable referenceBox
member)HdvPciDevice
callback trait functions unsafe
attribute. Even though it assumes it should not panic, it lead to confusion when the whole function was marked as unsafe
HdvPciDevice
callback trait functions as unsafe
, due to its assumption that they should not panic#[derive(Clone)]
to HdvPciDeviceBase
and HdvPciDeviceBaseWrapper
.unsafe
to the functions that expect a callback or some kind of assumption that the provided reference outlives the internal details. It used to not be marked as unsafe, but after seeing several bugs due to getting wrong the lifetime (and Rust compiler not being able to understand it correctly)vmbfs_root_path
get_handle
to handle
and get_handle_policy
to handle_policy
utilities
to separate all the higher abstract Rust abstraction on top of the basic safe wrappersenumerate_compute_systems
now supports an optional query parameterhypervdevicevirtualization
APIsschema
featurebindings
that exposes the raw bindings to the APIs (by default they are private to the crate)winutils_rs
to get a fix for WideString CoTaskMemFree/LocalFree wrappers