Skip to content

Add wslc support#526

Draft
patverb wants to merge 1 commit into
mainfrom
patverb/wslc
Draft

Add wslc support#526
patverb wants to merge 1 commit into
mainfrom
patverb/wslc

Conversation

@patverb

@patverb patverb commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Add  wslc  (WSL Container CLI) as a Windows-only container runtime (preview)

Description

Registers the new  WslcClient  from  @microsoft/vscode-container-client  as a selectable, Windows-only container runtime, exposed as "WSLC (Windows only, preview)". It's treated as an alternative to Docker/Podman, mirroring the existing auto-configurable client pattern.

Depends on microsoft/vscode-docker-extensibility# ( @microsoft/vscode-container-client@^0.6.0 ).

What's added / changed

•  AutoConfigurableWslcClient  — mirrors the Docker/Podman auto-configurable clients, but pins the command to  wslc  (ignores the shared  containers.containerCommand  override, since wslc is a specific named binary).
•  extension.ts  — registers the wslc client only on Windows ( isWindows()  gate), and wires up  reconfigure .
•  RuntimeManager  — if  wslc  is selected on a non-Windows host, rejects with a clear "WSLC is only available on Windows" error instead of a confusing timeout.

.NET SDK container task support

The .NET SDK's  LocalRegistry  publish target only supports Docker/Podman. To support wslc, the SDK run task now:

  1. Publishes the image to a temporary tar archive ( -p:ContainerArchiveOutputPath=<image>-.tar ) instead of  -p:LocalRegistry ,
  2. Loads it with  wslc load --input  ,
  3. Runs it — then deletes the temp tar in a  finally  (GUID-named to avoid collisions).

Docker/Podman continue to use  LocalRegistry  unchanged.

Fixes #501

Copilot AI review requested due to automatic review settings July 16, 2026 15:49
@patverb
patverb requested a review from a team as a code owner July 16, 2026 15:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds preview support for the Windows-only WSLC (WSL Container CLI) runtime across the extension, including runtime selection/registration, telemetry reporting, clearer non-Windows error handling, and enabling the .NET SDK container run task flow by publishing to a tar archive and loading it via wslc.

Changes:

  • Register a new Windows-only WslcClient runtime option (including settings UI + “choose runtime” command) and track it in telemetry.
  • Improve runtime selection behavior by failing fast with a clear error when WSLC is selected on non-Windows hosts.
  • Update the .NET SDK container run task to publish to a temporary image tar and load it into WSLC before running (with best-effort cleanup).

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/telemetry/registerRuntimeTelemetryHandler.ts Adds telemetry classification for the WSLC client.
src/tasks/netSdk/netSdkTaskUtils.ts Adds archive-output support for dotnet publish and a load command helper for WSLC.
src/tasks/netSdk/NetSdkRunTaskProvider.ts Implements publish→load→run flow for WSLC with temp tar cleanup.
src/runtimes/RuntimeManager.ts Adds explicit non-Windows rejection when WSLC is selected.
src/runtimes/clients/AutoConfigurableWslcClient.ts Introduces an auto-configurable WSLC client pinned to wslc.
src/extension.ts Registers the WSLC client on Windows and wires reconfigure behavior.
src/commands/chooseContainerRuntime.ts Exposes WSLC as a runtime choice on Windows; makes orchestrator optional.
package.nls.json Documents Windows-only availability for the containerClient setting.
package.json Adds WSLC to the containerClient enum + bumps container-client dependency.
CHANGELOG.md Notes WSLC support in the unreleased changelog.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +6 to 10
import { ClientIdentity, WslcClient } from '@microsoft/vscode-container-client';
import * as vscode from 'vscode';
import { configPrefix } from '../constants';
import { isWindows } from '../utils/osUtils';
import { TimeoutPromiseSource } from '../utils/promiseUtils';
@bwateratmsft
bwateratmsft marked this pull request as draft July 16, 2026 20:04
@bwateratmsft bwateratmsft self-assigned this Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support new WSL "native" container runtime

3 participants