zlayer-hns 0.11.1

Safe Rust wrapper for the Windows Host Compute Network Service (HCN v2)
Documentation

Safe Rust wrapper for the Windows Host Compute Network Service (HCN v2).

HCN is the networking half of the Windows container stack — companion to the Host Compute Service (HCS). The underlying surface lives in computenetwork.dll. This crate wraps those raw calls with RAII handle types, async-ready helpers around the synchronous HCN API, JSON schema types matching hcsshim/hcn v2, and high-level NetAttacher-friendly abstractions for attaching containers to networks via HCN namespaces.

The crate is Windows-only. On every other platform it compiles to an empty stub so callers can depend on it unconditionally.

unsafe policy

This crate is the authoritative Windows HCN FFI boundary for ZLayer. It exists specifically to wrap the unsafe computenetwork.dll entry points behind safe, typed Rust APIs, so unsafe is allowed at the crate level here even though the workspace-wide policy (-W unsafe-code) forbids it everywhere else. Every unsafe block, unsafe impl, unsafe fn, and unsafe method in this crate carries a SAFETY: comment explaining why the required invariants hold — do not add a new unsafe site without one.