Skip to content

Make copilot work in any terminal with a native Copilot CLI shim - #341667

Merged
Karthik Nadig (karthiknadig) merged 35 commits into
mainfrom
packaging/vscode-with-copilot
Oct 15, 2026
Merged

Karthik Nadig (karthiknadig) merged 35 commits into
mainfrom
packaging/vscode-with-copilot

Conversation

@karthiknadig

Copy link
Copy Markdown
Member

Makes copilot work in any terminal when VS Code is installed, without bundling GitHub Copilot CLI. VS Code ships a small native copilot shim that runs the user's Copilot CLI, or offers to install it when there's none.

Feature: microsoft/vscode-internalbacklog#7531. Design: microsoft/vscode-internalbacklog#9765.

Changes

Native copilot shim (copilot_shim/, a new Rust crate)

  • Ships in client and server builds at bin/copilot-shim/copilot (copilot.exe on Windows), next to the code command but in its own folder.
  • Runs the first real Copilot CLI on PATH with the original arguments, terminal I/O and exit code. It skips itself, other copies of the shim, and the old script shims, so it can't recurse.
  • When there's no Copilot CLI, it asks before installing it. On Windows it downloads GitHub's per-user MSI, checks its SHA-256 and its GitHub, Inc. Authenticode signature, and installs it without elevation. On macOS it uses Homebrew or the official script; on Linux, the official script.
  • VS Code never updates or uninstalls Copilot CLI or its data.

Windows setup (build/win32/copilot.iss, included from code.iss)

  • A GitHub Copilot CLI page: install it now, install it the first time you run copilot, or don't add copilot to PATH. It's skipped when a Copilot CLI is found, when the policy turns it off, and when the User Installer runs elevated.
  • Without a choice on the page, copilot follows the Add to PATH task. Silent installs can use /copilotcli=install|onfirstuse|none. The choice is remembered, and background updates never download anything.
  • Setup publishes the shim itself, renaming a running copy aside the way inno_updater does, so an open Copilot session never blocks an update. Uninstall removes only the shim and its PATH entry.
  • Fixes the uninstall PATH cleanup guard (if not CurUninstallStep = usUninstall).

Copilot extension: integrated terminals use the native shim, appended to PATH, instead of the JavaScript, PowerShell and batch shims, which are removed. Builds without the shim can use a local build for development.

Policy: CopilotCliCommand (setting chat.copilotCliCommand.enabled, from 1.143) turns all of this off: no Copilot page, no copilot on PATH, and no installs. A Copilot CLI installed separately isn't affected. The Agent Host enforces it.

Build: the shim is built and signed in the CLI jobs for every target, packaged with the client and server, and tested in PR CI (Linux Copilot Shim).

Requirements and behavior: copilot_shim/REQUIREMENTS.md and copilot_shim/SHIM_POST_INSTALL.md.

How to test

The Windows (microsoft/vscode-internalbacklog#9843 to #9855) and macOS and Linux (microsoft/vscode-internalbacklog#9880 to #9885) test plans have all been run. Setup and troubleshooting: microsoft/vscode-internalbacklog#9979.

Run on this branch, rebased on main:

Command Result
cargo test --locked in copilot_shim Passed, 71 tests
node --test lib/test/*Policy*.test.ts lib/test/policyConversion.test.ts lib/test/policyDataMerge.test.ts in build Passed, 73 tests
tsc --noEmit -p tsconfig.json in extensions/copilot Passed, 0 errors
vitest run on copilotCLITerminalIntegration.spec.ts, copilotCLINativeShim.spec.ts, copilotCLIChatSessions.spec.ts in extensions/copilot Passed, 53 tests
tsc --project src/tsconfig.json --noEmit --skipLibCheck No new errors: same output as main with the same local dependencies

Not run locally: npm run export-policy-data -- --check (needs a built Code OSS) and a full installer build; CI covers both.

- Publish the native `copilot` shim to {app}\bin\copilot-shim from the
  Inno Setup installer and manage its PATH entry. A new wizard page offers
  to install Copilot CLI now, on first use, or not at all.
- Support silent installs (/copilotcli=install|onfirstuse|none), a one-time
  migration for user installs with Add to PATH, the CopilotCliCommand
  policy, and uninstall cleanup. Fix the uninstall step guard.
- Copy the shim into the Windows package when the build provides it.
- Replace the Copilot extension's integrated-terminal script shims with the
  native shim, resolved next to the `code` command.

Refs microsoft/vscode-internalbacklog#9765

Co-authored-by: Copilot <[email protected]>
Add the cross-platform Rust shim, runtime tests, and independent build and signing pipeline validation.

Co-authored-by: Copilot <[email protected]>
Opening a directory on Windows requires FILE_FLAG_BACKUP_SEMANTICS, so reading
the file identity of every PATH entry failed with ERROR_ACCESS_DENIED and the
shim never discovered an installed Copilot CLI. Open with attribute-only access
and backup semantics instead.

Also keep test thread names, which contain `::`, out of Windows temp file names.

Co-authored-by: Copilot <[email protected]>
- Add the leading --vscode-shim option namespace: the clear modifier and the
  info, probe and install setup commands that the Windows installer runs.
- Install GitHub's per-user Copilot CLI MSI on Windows (checksum and
  "GitHub, Inc." Authenticode verification) instead of winget, and search
  its install folder during discovery.
- Fix .cmd/.bat launches: pass cmd switches unquoted and encode the tail for
  /E:ON /V:OFF.
- Make the ConPTY tests work with redirected stdio (as in CI), and fix the
  Windows and Linux test and lint failures.
- Build the shim in the existing CLI jobs and add it to bin/copilot-shim of
  the client and server builds before they are signed, replacing the
  separate shim jobs and the Windows shim signing job.
- Update REQUIREMENTS.md for these decisions.

Co-authored-by: Copilot <[email protected]>
- Declare chat.copilotCliCommand.enabled, controlled by the CopilotCliCommand
  policy. The Copilot extension stops adding the native shim to integrated
  terminals, and uses copilot from PATH, when it is off.
- The shim reads the policy on Windows for every VS Code quality (a disabled
  policy in any quality wins). It still launches an installed Copilot CLI but
  never installs or updates one, and exits with code 10 instead. probe
  reports the policy and install reports a policy status.
- Setup applies the same any-quality rule and no longer reads aiDisabled from
  the probe.

policyData.jsonc still needs `npm run export-policy-data`.

Co-authored-by: Copilot <[email protected]>
- Prompts go to stderr, and the shim only prompts when stdin and stderr are
  terminals.
- Without a terminal, a missing Copilot CLI prints a message to stderr and
  exits with 127 (command not found) instead of printing the prompt to stdout
  and exiting 0. An old Copilot CLI is launched with a warning, because a
  script can't answer the update prompt.
- Update the Unix tests for the --vscode-shim clear modifier, which they still
  passed as the removed --clear option.

Co-authored-by: Copilot <[email protected]>
- Launch the first usable Copilot CLI without running it first. The 1.0.82
  minimum and the update prompt are gone; the Copilot CLI keeps itself up to
  date, and running --version before every launch cost 0.15-1 s (seconds on
  the first run after an update).
- Locate PowerShell only when discovery reaches a .ps1 candidate, instead of
  starting it on every Windows launch (about 450 ms).
- Search only the first 16 MiB of a candidate for the shim marker, instead of
  reading all of a 150 MB Copilot CLI executable.

Co-authored-by: Copilot <[email protected]>
- Setup publishes the shim with inno_updater's three-way rename: stage
  new_copilot.exe, rename copilot.exe to old_copilot.exe (or old_N_copilot.exe
  when an older session holds it), rename the new copy into place, and restore
  the old copy if that fails. Each step is retried for transient locks, and
  old_* copies still in use are skipped until a later install or update.
- Replace the shim only when its embedded file version changes. build.rs
  writes the version resource directly, with no new dependencies.
- Never run the MSI when Copilot CLI is already installed (its file or its
  MSI registration), and launch the MSI-installed CLI by its full path right
  after installing, since the terminal's PATH doesn't have it yet.
- Soften setup's PowerShell note to a recommendation: Copilot CLI supports
  Windows PowerShell 5.1.
- Document ownership: VS Code owns only the shim; Copilot owns the CLI, its
  PATH entry, updates, uninstall and data.

Co-authored-by: Copilot <[email protected]>
- Without the installer page, an explicit choice (the page earlier or
  /copilotcli=) is kept; otherwise copilot is added when the Add to PATH
  task for code is selected. This covers silent installs, silent
  reinstalls, background updates and interactive installs that skip the
  page, for user and system installs, including once for existing installs.
- A saved policy state isn't a choice, so lifting CopilotCliCommand=0
  brings back the default. Policy 1 means the same as not set.
- Append the shim folder so that removing it restores the user's PATH
  exactly, including a trailing separator.

Co-authored-by: Copilot <[email protected]>
Generated with npm run export-policy-data.

Co-authored-by: Copilot <[email protected]>
main is now 1.141, so the policy's minimumVersion follows it. policyData.jsonc
was regenerated with npm run export-policy-data.

Co-authored-by: Copilot <[email protected]>
The shim verified the MSI's Authenticode signature with WTD_REVOKE_NONE, so a
revoked GitHub signing certificate would still be accepted. Check revocation
for the whole chain except the root. When the revocation server can't be
reached, the Windows Authenticode policy decides; by default it accepts.

Co-authored-by: Copilot <[email protected]>
Discovery read the first 16 MiB of every candidate to find the shim marker, so
launching an installed Copilot CLI (about 150 MB) read 16 MiB on every run.
Only candidates up to 16 MiB are searched now; the shim is under 1 MB. With a
signed 30 MB candidate this saves about 60 ms per launch.

Most of the remaining startup cost in local builds is Microsoft Defender
scanning the unsigned shim on every launch; the same binary signed launches
in a few milliseconds.

Co-authored-by: Copilot <[email protected]>
- Detect install progress from the shim's heartbeat instead of converting the
  UTF-16 progress file through the ANSI code page.
- Remove the system installer's HKCU PATH cleanup; VS Code never adds that
  entry.
- Replace the test-only retry override with a preprocessor define and share
  one retry loop for copying and renaming.
- Log the previous shim version, not the new one twice.
- Update the documented shim contract.

Co-authored-by: Copilot <[email protected]>
Correctness:
- Honor a setup cancel after the download: check before msiexec starts.
- Ctrl+C during the first-use Windows install: the install child handles
  Ctrl+C and stops at its next step, removing the partial MSI, and the parent
  waits for it instead of killing it after 250 ms. Once msiexec runs, it
  finishes and reports.
- On Unix, exec the Copilot CLI, so killing copilot by PID ends the CLI and
  signals and exit status are the CLI's.
- A PATH entry that can't be inspected no longer blocks installer tool
  discovery, and a missing current directory only skips relative entries.
- A silent install checks the registry PATH for an existing CLI, like probe.
- build.rs rejects pre-release versions, which the file version can't carry.

Encoding and locale:
- Scripts that aren't UTF-8 (OEM .cmd, UTF-16 .ps1) are candidates, not
  skipped; a UTF-8 prefix cut inside a character still classifies.
- WinHTTP errors use winhttp.dll's message text in the user's language, and
  OS errors use the system's localized message.
- The install prompt accepts full-width y from East Asian IMEs.
- PowerShell from the Microsoft Store (app execution alias) is usable.

Performance:
- Look up the four candidate names directly instead of listing every PATH
  directory, and don't inspect directories.
- Read a candidate once for both the marker and legacy checks, and not at all
  when it's larger than 16 MiB.
- Locate ComSpec only for .cmd/.bat candidates.
- The probe uses HEAD requests and skips the network when a CLI is found.

Removed: the info command, unused probe keys, installed_msi_candidate
(discovery already searches the MSI folder), launch adapters, host kinds,
unused candidate fields and error payloads, the single-variant Cancellation,
the Unix captured-probe path and its tests, the WinHTTP default-proxy
fallback, sync_all on the temporary MSI, and trivial tests.

Co-authored-by: Copilot <[email protected]>
* Use the Copilot shim that ships with VS Code in terminals

The extension had switched to copying a local development build into global
storage, so a shipped build ignored its bundled shim and ran copilot from PATH.
Use the shim next to the code command again, remove the script shims that
earlier versions stored in global storage, and fall back to the development
deployment only when the build doesn't ship a shim.

Co-authored-by: Copilot <[email protected]>

* Don't tie the development fallback test to the PATH order

The terminal PATH order is changed separately.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
The extension had switched to prepending the shim's folder to the integrated
terminal PATH, so the shim came before the user's own PATH. Append it again,
as Windows setup does, so a Copilot CLI already on PATH is found first.

Co-authored-by: Copilot <[email protected]>
A test runner started in a new process group ignores Ctrl+C, and the shim
under test inherited that, so the cancellation test exited 1 instead of 130.
Restore Ctrl+C before starting the shim, as an interactive terminal does.

Co-authored-by: Copilot <[email protected]>
Setup skips its Copilot page when Copilot CLI is already installed, which
looked like a missing page. The probe now reports the path it found, setup
logs it, and the Ready page shows "GitHub Copilot CLI: Already installed at
<path>".

Co-authored-by: Copilot <[email protected]>
SHIM_POST_INSTALL.md described the shim before the installer-only PATH and the
official-script install directory fallback existed, and referenced types that
were since removed. Keep the investigation (the transcript, why only the legacy
shim got the profile prompt, how the script picks a profile) and describe what
the shim does now.

Co-authored-by: Copilot <[email protected]>
…mode (#338991)

Always explain why the Copilot shim stopped without running the CLI

With verbose mode off, several outcomes ended copilot with a nonzero exit and
no output: the policy block (10), no terminal (127), a CLI that can't start,
unsupported targets, missing installer tools, and failed installs, including
the Windows MSI install's reason. Print one line for each of these; keep
discovery, probe, and per-attempt detail as verbose diagnostics, and point to
verbose mode after a failed install.

VSCODE_COPILOT_SHIM_VERBOSE also turns on verbose mode, for scripts and other
places where the arguments can't be changed. Malformed --vscode-shim options,
which only VS Code passes, stay quiet.

Co-authored-by: Copilot <[email protected]>
main is now 1.142, so the policy's minimumVersion follows it.

Co-authored-by: Copilot <[email protected]>
main now requires every policy to declare how the Agent Host enforces it.
Windows setup and the copilot command read CopilotCliCommand themselves, so it
applies to shells of every session type, like the other shared editor-owned
controls.

Co-authored-by: Copilot <[email protected]>
macOS file systems reject names that aren't valid UTF-8, so the test failed on
macOS with "Illegal byte sequence". installer_path keeps PATH entries
byte-for-byte whether or not they exist, so the entry no longer needs a folder.

Co-authored-by: Copilot <[email protected]>
The link on the GitHub Copilot CLI page wasn't a tab stop, so keyboard users
couldn't reach it. Tab now stops on it, and Space opens it.

Fixes microsoft/vscode-internalbacklog#9998

Co-authored-by: Copilot <[email protected]>
During the first-use install, copilot rewrote its download line at every
percent, and screen readers announced each rewrite. It now shows the line when
the download starts and finishes, and otherwise at most every 5 seconds.

Fixes microsoft/vscode-internalbacklog#9999

Co-authored-by: Copilot <[email protected]>
Only the "when I first run copilot" option said it adds copilot to PATH, so
Install now read as if it didn't. Every option's description now starts with
what it does to PATH, and Ready to Install says the same.

Install now also adds the copilot command to PATH when Copilot CLI installs,
not only when the install fails, so both install options end the same way: if
Copilot CLI is uninstalled later, copilot offers to install it again instead of
disappearing outside VS Code.

Fixes microsoft/vscode-internalbacklog#9996

Co-authored-by: Copilot <[email protected]>
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Base: 14df69c4 Current: dc7585fb

No screenshot changes.

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.

🟡 Changes recommended

Policy enforcement and executable-selection defects remain unresolved.

3 open findings
What changed in this PR

Adds a native Copilot CLI launcher to VS Code without bundling the CLI itself.

Changes:

  • Replaces legacy script shims with a Rust launcher and installation flow.
  • Adds Windows setup integration and enterprise policy controls.
  • Packages the shim across platforms and adds tests and CI checks.
File Description
src/​vs/​workbench/​contrib/​chat/​common/​constants.ts Adds the command setting identifier.
src/​vs/​workbench/​contrib/​chat/​browser/​chat.shared.contribution.ts Registers the setting and policy.
src/​vs/​platform/​agentHost/​common/​agentHostPolicySupport.ts Declares policy support.
extensions/​copilot/​src/​extension/​chatSessions/​vscode-node/​test/​copilotCLITerminalIntegration.spec.ts Tests native launches and PATH contributions.
extensions/​copilot/​src/​extension/​chatSessions/​vscode-node/​test/​copilotCLINativeShim.spec.ts Tests local shim deployment and recovery.
extensions/​copilot/​src/​extension/​chatSessions/​vscode-node/​test/​copilotCLIChatSessions.spec.ts Removes the legacy script mock.
extensions/​copilot/​src/​extension/​chatSessions/​vscode-node/​copilotCLIShim.ts Removes the JavaScript bootstrapper.
extensions/​copilot/​src/​extension/​chatSessions/​vscode-node/​copilotCLIShim.ps1 Removes the PowerShell bootstrapper.
extensions/​copilot/​src/​extension/​chatSessions/​vscode-node/​copilotCLINativeShim.ts Deploys local development shims safely.
extensions/​copilot/​.vscodeignore Removes legacy bundle packaging.
extensions/​copilot/​.esbuild.mts Removes the legacy build entry.
copilot_shim/​tests/​fixtures/​legacy/​windows-wrapper.cmd Adds a legacy batch fixture.
copilot_shim/​tests/​fixtures/​legacy/​windows-bootstrapper.ps1 Adds a legacy PowerShell fixture.
copilot_shim/​tests/​fixtures/​legacy/​posix-launcher.sh Adds a legacy Unix fixture.
copilot_shim/​tests/​fixtures/​legacy/​npm-wrapper.ps1 Adds an npm PowerShell fixture.
copilot_shim/​tests/​fixtures/​legacy/​npm-wrapper.cmd Adds an npm batch fixture.
copilot_shim/​tests/​fixtures/​legacy/​git-bash-wrapper.sh Adds a Git Bash fixture.
copilot_shim/​tests/​app.rs Tests discovery and launch contracts.
copilot_shim/​src/​version.rs Parses PowerShell host versions.
copilot_shim/​src/​runtime.rs Implements native runtime operations.
copilot_shim/​src/​prompt.rs Handles installation prompts and terminal clearing.
copilot_shim/​src/​platform/​windows.rs Implements Windows process supervision.
copilot_shim/​src/​platform/​unix.rs Implements Unix execution and signals.
copilot_shim/​src/​platform/​mod.rs Builds commands and encodes batch arguments.
copilot_shim/​src/​model.rs Defines runtime and command models.
copilot_shim/​src/​main.rs Adds the executable entry point.
copilot_shim/​src/​lib.rs Initializes the launcher and binary marker.
copilot_shim/​src/​legacy.rs Detects legacy script shims.
copilot_shim/​src/​invocation.rs Parses shim-specific options.
copilot_shim/​src/​identity.rs Detects matching files and binary markers.
copilot_shim/​src/​command.rs Resolves interpreters and launch commands.
copilot_shim/​SHIM_POST_INSTALL.md Documents Unix installation behavior.
copilot_shim/​rustfmt.toml Configures tab indentation.
copilot_shim/​Cargo.toml Defines the Rust crate and dependencies.
copilot_shim/​Cargo.lock Locks Rust dependencies.
copilot_shim/​build.rs Embeds Windows version resources.
copilot_shim/​.cargo/​config.toml Configures Windows linker hardening.
build/​win32/​i18n/​messages.en.isl Adds installer messages.
build/​win32/​code.iss Integrates shim setup and uninstall hooks.
build/​lib/​policies/​policyData.jsonc Includes exported policy metadata.
build/​gulpfile.vscode.win32.ts Enables setup integration when packaged.
build/​azure-pipelines/​win32/​steps/​product-build-win32-sign.yml Includes the shim before signing.
build/​azure-pipelines/​win32/​product-build-win32.yml Updates pipeline documentation comments.
build/​azure-pipelines/​win32/​product-build-win32-cli.yml Builds and publishes Windows shims.
build/​azure-pipelines/​oss/​cargo-section4.test.ts Tests shim dependency parsing.
build/​azure-pipelines/​linux/​steps/​product-build-linux-package.yml Packages Linux shims.
build/​azure-pipelines/​linux/​product-build-linux-cli.yml Builds and publishes Linux shims.
build/​azure-pipelines/​darwin/​steps/​product-build-darwin-compile.yml Includes shims before macOS signing.
build/​azure-pipelines/​darwin/​product-build-darwin-cli.yml Builds and publishes macOS shims.
build/​azure-pipelines/​copilot-shim/​copilot-shim-quality.yml Adds Rust quality checks.
build/​azure-pipelines/​copilot-shim/​copilot-shim-compile.yml Builds and validates shim artifacts.
build/​azure-pipelines/​alpine/​product-build-alpine.yml Packages Alpine server shims.
build/​azure-pipelines/​alpine/​product-build-alpine-cli.yml Builds and publishes Alpine shims.
.vscode/​settings.json Registers the Rust project.
.gitignore Excludes shim build output.
.github/​workflows/​pr.yml Adds shim PR checks.
.github/​workflows/​pr-linux-cli-test.yml Makes Rust checks reusable.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread copilot_shim/src/runtime.rs Resolved
Comment thread copilot_shim/src/platform/mod.rs Resolved
Comment thread copilot_shim/src/runtime.rs Resolved
cmd.exe expands %VARIABLE% even inside quotes, so a .cmd or .bat Copilot CLI
in a folder whose name contains %NAME% was launched from the wrong path. Escape
% in the script path the same way as in the arguments.

Co-authored-by: Copilot <[email protected]>
On macOS and Linux, discovery accepted a candidate when any execute bit was
set, so a file only another user can execute was chosen and failed with
EACCES instead of moving on to the next Copilot CLI on PATH. Check execute
access for the current user with faccessat(AT_EACCESS), like a shell's PATH
search.

Co-authored-by: Copilot <[email protected]>
Remove references to Copilot CLI's private source and packaging internals from
the shim's requirements and comments. Keep the shim's own behavior: install
only where there is no Copilot CLI, and never run the MSI over one.

Co-authored-by: Copilot <[email protected]>
@karthiknadig
Karthik Nadig (karthiknadig) merged commit 25f764a into main Oct 15, 2026
57 of 58 checks passed
@karthiknadig
Karthik Nadig (karthiknadig) deleted the packaging/vscode-with-copilot branch October 15, 2026 18:33
@vs-code-engineering vs-code-engineering Bot added this to the 1.143.0 milestone Oct 15, 2026
Don Jayamanne (DonJayamanne) added a commit that referenced this pull request Oct 16, 2026
* terminal: offer optional Copilot CLI installation on macOS

Extend the macOS PATH action with a localized Copilot opt-in and run the shipped shim in a local terminal without waiting for installation to finish.

Reuse shim discovery and installation while preserving normal launch, other-platform behavior, policy gates, and existing shell-command metadata. Add regression coverage and documentation.

Follow-up to #341667.

Co-authored-by: Copilot <[email protected]>

* terminal: default Copilot install to Yes and fix Windows tests

Select Yes by default in the optional macOS installation picker and update its documented behavior.

Normalize both expected executable paths with URI.file(...).fsPath so the tests match the native Windows path format.

Addresses the path assertion review on #341982.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
RomanNikitenko added a commit to RomanNikitenko/che-code that referenced this pull request Nov 11, 2026
Upstream 1.143 (microsoft/vscode#341667) replaced the runtime script
shims that the Copilot extension generated with a native Rust shim that
product builds install into bin/copilot-shim/ next to node, and the
extension appends that directory to the end of the terminal PATH.
che-code only runs the gulp packaging task, which never produced the
binary, so typing `copilot` in a workspace terminal printed "command
not found" while the terminal initial hint advertised the command.

Build the shim from the in-tree sources (code/copilot_shim/) inside
each platform builder stage with the distro Rust toolchain (rust/cargo
via apk on Alpine, rust-toolset via yum on UBI8/UBI9) and install it at
<server-tree>/bin/copilot-shim/copilot — the only path the extension
checks on Linux. cargo build --release --locked keeps the build pinned
to the untouched in-tree Cargo.lock, and the toolchain stays in the
builder stages: the FROM scratch content stages only gain the ~700 KB
binary. Distro toolchain, inline RUN step and --locked also keep this
directly reusable by the downstream hermetic (Konflux/Hermeto) build.

The shim stays dynamically linked on all three platforms. On UBI it
needs glibc + libgcc_s.so.1, which the bundled node needs anyway (and
which downstream FIPS check-payload requires); on Alpine it needs musl
+ libgcc_s.so.1 — a subset of the dependencies of the musl node itself
(libstdc++/libgcc_s/musl), so no RUSTFLAGS crt-static override is
needed.

Co-Authored-By: Claude Code <[email protected]>
Signed-off-by: Roman Nikitenko <[email protected]>
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.

5 participants