hcs-rs

Rust wrapper of Host Compute Service API

Overview

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.

Requirements

For this wrapper to build properly, the following requirements need to be met by the building machine:

Wrapped Windows 10 SDK APIs

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: - C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\computecore.h - C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\computedefs.h - C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\computenetwork.h - C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\computestorage.h - C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\umhypervdevicevirtualization.h - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64\computecore.lib - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64\computenetwork.lib - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64\computestorage.lib - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64\vmdevicehost.lib - C:\Windows\System32\computecore.dll - C:\Windows\System32\computenetwork.dll - C:\Windows\System32\computestorage.dll - C:\Windows\System32\vmdevicehost.dll

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\umhypervdevicevirtualization.h | C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64\vmdevicehost.lib |

Features

| 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 |

Crates.io version notes

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.