https://github.com/jsturtevant/hcn-rs
Library for working with the Windows Host Compute Network.
https://github.com/jsturtevant/hcn-rs
Last synced: 2 months ago
JSON representation
Library for working with the Windows Host Compute Network.
- Host: GitHub
- URL: https://github.com/jsturtevant/hcn-rs
- Owner: jsturtevant
- License: mit
- Created: 2023-09-02T08:12:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-12T18:37:56.000Z (over 1 year ago)
- Last Synced: 2025-01-26T05:27:07.106Z (4 months ago)
- Language: Rust
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README

# hcn-rs
Library for working with the [Windows Host Compute Network](https://learn.microsoft.com/en-us/windows-server/networking/technologies/hcn/hcn-top).
## Example
```
use hcn::get_namespace;let namespace = get_namespace(api_namespace.id.as_str())?;
println!("Namespace id: {}", namespace.id);
```See [examples folder](examples) for more.
## JSON schema
The [HCN API Schema](https://learn.microsoft.com/en-us/virtualization/api/hcn/hns_schema) is exposed as a module that can be used to call the API.
## Low Level API
The library also has a low level API that translates the HCN C library to Rust friendly implementation. This is used throughout the project and can provide flexibility if the schema hasn't been updated yet but does require additional steps. See the `*_api.rs` in the [examples folder](examples)
### Credit
The low level api was originally from https://github.com/rafawo/hcs-rs under MIT. This project updated the API's to use https://github.com/microsoft/windows-rs, updated error handling, changed handle types, added HCN schema and wrappers around the API to simplify its use.