Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
wslc
Safe Rust wrapper for the preview Microsoft WSL Containers SDK.
The crate loads wslcsdk.dll at runtime, validates common inputs before calling
the SDK, maps failing HRESULT values into wslc::Error, and releases SDK
handles with RAII. It does not redistribute Microsoft SDK files.
use PathBuf;
use ;
Links
- WSL developer documentation
- WSL development loop
- WSL container API reference
- C++ API end-to-end example
- WSL container overview
- Microsoft.WSL.Containers NuGet package
- SDK installation guide
- Rust examples
SDK Loading
The crate dynamically loads wslcsdk.dll; normal builds and unit tests can run
without the preview SDK installed. Real calls return Error::SdkNotFound when
the DLL or a required export is unavailable.
Install Microsoft.WSL.Containers from NuGet and put its
runtimes\win-x64\native directory on PATH before running real WSLC
operations. See the SDK installation guide linked above for the full setup.
Registry Mirrors
Image references are passed through unchanged by default. Set
WSLC_REGISTRY_MIRROR to rewrite Docker Hub references before they reach WSLC:
$env:WSLC_REGISTRY_MIRROR = "<your-registry>"
For a specific registry, use a variable such as
WSLC_REGISTRY_MIRROR_GHCR_IO.
Testing
cargo test -p wslc
cargo test -p wslc --features integration --test integration_smoke
The ignored Alpine E2E test pulls an image and starts a real container:
cargo test -p wslc --features integration --test integration_smoke -- --ignored --nocapture