Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/backends/wslc/wsl-container-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ MXC, which lets you run Linux containers on Windows using the WSLC SDK.
| Requirement | Details |
|---|---|
| **Windows 10 1903 (build 18362.1049)+ on x64, or Windows 10 2004 (build 19041)+ on ARM64** | WSL 2's own [system requirements](https://learn.microsoft.com/windows/wsl/install-manual#step-2---check-requirements-for-running-wsl-2). MXC does not check the OS version itself β€” see [How an unsupported Windows version is reported](#how-an-unsupported-windows-version-is-reported) below. The WSL runtime package installs only on build 19041 and later, so in practice a 1903/1909 host still needs an upgrade to reach the WSL version below. |
| **WSL 3.0.3+** | The installed WSL runtime package must meet the WSLC minimum; see Step 1 below for installation |
| **WSL 3.0.5+** | The installed WSL runtime package must meet the WSLC minimum; see Step 1 below for installation |
| **WSLC SDK** | `wslcsdk.dll` is a separate client SDK and must be in the same directory as the running executable (`wxc-exec.exe`, or your own binary when using the Rust SDK) |
| **Container images** | Reachable from a registry, already cached, or supplied as a local tar |

Expand Down Expand Up @@ -54,9 +54,9 @@ optional component is absent as well. Any SDK call that reaches the WSL service
can return it, so an unexpected `0x80040327` from a WSLC operation means the host
OS is below WSL 2's floor, not that WSL is merely uninstalled.

## Step 1 β€” Install WSL 3.0.3+
## Step 1 β€” Install WSL 3.0.5+

The WSLC SDK requires WSL version 3.0.3 or later. Update WSL to the latest
The WSLC SDK requires WSL version 3.0.5 or later. Update WSL to the latest

@theelliotm Elliot (theelliotm) Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be a minimum version bump like all other bumps. There is currently no functionality for version-gating features/testing related to the WSLC SDK.

version:

```powershell
Expand All @@ -69,7 +69,7 @@ Verify your WSL version after updating:
wsl --version
```

The WSL version should be **3.0.3.0 or later**. If `wsl --update`
The WSL version should be **3.0.5.0 or later**. If `wsl --update`
does not bring you to the required version, build WSL from the `master`
branch:

Expand Down Expand Up @@ -763,7 +763,7 @@ images β€” cannot be used.
| `WSLC runtime unavailable` **on a host below WSL 2's minimum Windows version** | The WSL runtime package cannot install on this OS, so it reports as missing β€” MXC does not distinguish the two cases | Run `wsl --update`; WSL reports the version verdict ("Windows version {} does not support the packaged version of Windows Subsystem for Linux"). Upgrade Windows β€” see [How an unsupported Windows version is reported](#how-an-unsupported-windows-version-is-reported) |
| HRESULT `0x80040327` (`WSL_E_OS_NOT_SUPPORTED`) from any WSLC call | The SDK reached WSL's service-connect guard on a host that is neither Windows 11 nor has the WSL support interface | Upgrade Windows. `0x80040321` (`WSL_E_WSL_OPTIONAL_COMPONENT_REQUIRED`) is the sibling code when the legacy `lxss` component is absent too |
| `Failed to load wslcsdk.dll` | DLL not in same directory as `wxc-exec.exe` | Copy `wslcsdk.dll` next to the binary |
| `WSLC runtime unavailable` | WSL runtime package is missing, older than 3.0.3, or the Virtual Machine Platform optional component is disabled | Update WSL with `wsl --update`, verify the installed version with `wsl --version`, and enable the Virtual Machine Platform optional component if required. The WSLC SDK DLL is a separate dependency and does not replace the WSL runtime package. |
| `WSLC runtime unavailable` | WSL runtime package is missing, older than 3.0.5, or the Virtual Machine Platform optional component is disabled | Update WSL with `wsl --update`, verify the installed version with `wsl --version`, and enable the Virtual Machine Platform optional component if required. The WSLC SDK DLL is a separate dependency and does not replace the WSL runtime package. |
| `WSLC runtime unavailable. Missing components: SdkNeedsUpdate` | The opposite direction: your installed WSL is **newer** than the WSLc SDK this MXC build ships (specified by `WSLC_SDK_VERSION` in `src/mxc-sdk/build/build_wslc_common.rs`) | Update MXC to a build that includes a newer SDK. Do **not** update WSL β€” it is already ahead, and updating it further will not clear this. |
| `WSLC image '<name>' is not cached, and this sandbox declares no egress` | An isolated config named an image the store does not have | Warm the cache with `--setup-wslc`, set `imageTarPath`, or allow egress. For a lifecycle operation the store is a daemon slot, so warm it with `setup-wslc.ps1 -DaemonSlots 1` |
| `WSLc store unavailable: the image store at <path> is already held by another live session` | Two processes reached the same store, which admits one live session | Wait for the holder to release it. A running `wxc-wslc-daemon.exe` releases its slot after `MXC_WSLC_DAEMON_IDLE_TIMEOUT_SECS` (default 300s); a create-and-run execution releases its store when the run ends |
Expand Down
2 changes: 1 addition & 1 deletion docs/backends/wslc/wslc-state-aware.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Native builds still require the `wslc` feature (`build.bat --with-wslc`).

## Why a daemon

The WSLc SDK (`wslcsdk.dll`, 3.0.3) has **no cross-process session re-attach**: every operation
The WSLc SDK (`wslcsdk.dll`, 3.0.5) has **no cross-process session re-attach**: every operation
(`WslcCreateContainer`, `WslcStartContainer`, `WslcCreateContainerProcess`, image pull, stop /
delete) requires a live in-process `WslcSession` / `WslcContainer` handle, and there is no
`WslcOpenSession`. Each lifecycle phase runs as a **separate**
Expand Down
2 changes: 2 additions & 0 deletions docs/development/build-and-test/wslc-sdk-bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ match the pinned SDK.
cargo test -p mxc-sdk --features wslc --lib wslc::common # includes ABI size/enum asserts
cargo fmt --all -- --check
cargo clippy -p mxc-sdk --features wslc --all-targets -- -D warnings
cd ..
.\scripts\generate-wslc-bindings.ps1 -Check
```

7. **Run the WSLC E2E suite on a live WSL host** (cannot run in GitHub Actions β€”
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-wslc-bindings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ try {
# newtypes via --bitfield-enum; exclusive-value enums become opaque
# newtypes via --newtype-enum. Both keep the C ABI while avoiding UB from
# out-of-range discriminants that a plain Rust `enum` would allow.
$bitfieldEnums = 'Wslc(ContainerFlags|SessionFeatureFlags|ContainerStartFlags|DeleteContainerFlags|ComponentFlags|VhdRequirementsFlags|ProcessFlags)'
$bitfieldEnums = 'Wslc(ContainerFlags|SessionFeatureFlags|ContainerStartFlags|DeleteContainerFlags|ComponentFlags|VhdRequirementsFlags|ProcessFlags|NetworkFlags)'
$newtypeEnums = 'Wslc(PortProtocol|Signal|ProcessIOHandle|ContainerNetworkingMode|VhdType|SessionTerminationReason|ContainerState|ProcessState|ImageProgressStatus)'

$generatedFile = if ($Check) { Join-Path $staging "wslcsdk_sys.rs" } else { $outFile }
Expand Down
5 changes: 4 additions & 1 deletion src/mxc-sdk/build/build_wslc_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use std::path::{Path, PathBuf};
use std::process::Command;

/// Pinned WSLC SDK version. Override with the `WSLC_SDK_VERSION` env var.
const WSLC_SDK_VERSION: &str = "3.0.3";
const WSLC_SDK_VERSION: &str = "3.0.5";
Comment thread
Copilot marked this conversation as resolved.
Resolved
Comment thread
theelliotm marked this conversation as resolved.
Resolved

/// Direct anonymous content URL for a package version on the public
/// MxcDependencies Azure Artifacts feed (mirrors nuget.org; reachable from the
Expand Down Expand Up @@ -293,6 +293,9 @@ fn expected_sha256(version: &str) -> Option<String> {
// version. This is an exact-bytes content pin, independent of the NuGet
// author signature.
match version {
"3.0.5" => {
Some("23e905e0f0925834d9960d4d752f8bedcbd34cb59a20fb0578c6336745f8e88f".to_string())
}
"3.0.3" => {
Some("d31f78cc4816ccccc0dc196ecf4d2b27911b8ed677b4b9cc697274e941b6511b".to_string())
}
Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions src/mxc-sdk/build/wslc_common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

**Package:** `Microsoft.WSL.Containers`
**Version:** pinned in `src/mxc-sdk/build/build_wslc_common.rs`
(`WSLC_SDK_VERSION`, currently **3.0.3**)
(`WSLC_SDK_VERSION`, currently **3.0.5**)
**Source:** the [`MxcDependencies`](https://dev.azure.com/shine-oss/mxc/_artifacts/feed/MxcDependencies)
Azure Artifacts feed β€” a public, anonymous-read mirror of nuget.org.

Expand Down Expand Up @@ -42,7 +42,7 @@ environment variable.

## Contents

- `Microsoft.WSL.Containers.3.0.3.nupkg` β€” vendored fallback copy of the SDK
- `Microsoft.WSL.Containers.<version>.nupkg` β€” vendored fallback copy of the SDK
(header `wslcsdk.h`, import libs `wslcsdk.lib`, and runtime `wslcsdk.dll` for
x64 and ARM64). Must match `WSLC_SDK_VERSION` in `build.rs`.

Expand Down
2 changes: 1 addition & 1 deletion src/mxc-sdk/src/backends/wslc/common/sdk_init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub(crate) fn prerequisite_error(missing: WslcComponentFlags) -> String {
);
}
if needs_wsl_package {
guidance.push("install WSL 3.0.3 or newer by running `wsl --update`".to_string());
guidance.push("install WSL 3.0.5 or newer by running `wsl --update`".to_string());
}
if needs_sdk_update {
// MXC's vendored SDK is behind the installed WSL, so the fix is on MXC's
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3274,7 +3274,7 @@ mod tests {
sdk_init::prerequisite_error(WslcComponentFlags::WSLC_COMPONENT_FLAG_WSL_PACKAGE);

assert!(message.contains("WslPackage"));
assert!(message.contains("3.0.3"));
assert!(message.contains("3.0.5"));
assert!(message.contains("wsl --update"));
assert!(!message.contains("--pre-release"));
assert!(!message.contains("Virtual Machine Platform"));
Expand Down
Loading
Loading