Skip to content

fix: add x86_64-unknown-linux-musl build target#112

Open
Bortlesboat wants to merge 1 commit intogoogleworkspace:mainfrom
Bortlesboat:fix/linux-npm-install
Open

fix: add x86_64-unknown-linux-musl build target#112
Bortlesboat wants to merge 1 commit intogoogleworkspace:mainfrom
Bortlesboat:fix/linux-npm-install

Conversation

@Bortlesboat
Copy link
Contributor

@Bortlesboat Bortlesboat commented Mar 5, 2026

Summary

  • Add x86_64-unknown-linux-musl to cargo-dist build targets in dist-workspace.toml
  • Fixes npm install failure on musl-based Linux systems (Alpine, NixOS, Docker scratch)

Fixes #86

Problem

When installing via npm on a musl-based Linux system, the install script detects glibc incompatibility and tries to fall back to a static musl binary. However, no musl target was configured, so the fallback fails with:

Platform with type "Linux" and architecture "x64" is not supported

Solution

Add x86_64-unknown-linux-musl to the targets list so cargo-dist builds and publishes a statically-linked musl binary alongside the glibc variant. The npm install script's existing musl fallback logic will then find and use this binary.

Test plan

  • CI release pipeline builds the musl target successfully
  • npm install works on Alpine Linux / musl-based containers

@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@changeset-bot
Copy link

changeset-bot bot commented Mar 5, 2026

🦋 Changeset detected

Latest commit: 83256ba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@googleworkspace/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@google-cla
Copy link

google-cla bot commented Mar 5, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@jpoehnelt
Copy link
Member

Need cla signed.

@Bortlesboat
Copy link
Contributor Author

I have signed the Google CLA — please re-check.

@jpoehnelt
Copy link
Member

conflicts to resolve

@Bortlesboat Bortlesboat force-pushed the fix/linux-npm-install branch 5 times, most recently from 5751c2d to f5af70d Compare March 5, 2026 15:55
@Bortlesboat
Copy link
Contributor Author

Rebased and resolved the conflicts with the new aarch64 targets on main. Ready for review.

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.19%. Comparing base (f6d74b0) to head (f5af70d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #112   +/-   ##
=======================================
  Coverage   55.19%   55.19%           
=======================================
  Files          38       38           
  Lines       13166    13166           
=======================================
  Hits         7267     7267           
  Misses       5899     5899           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Bortlesboat Bortlesboat force-pushed the fix/linux-npm-install branch from f5af70d to c6d7ee0 Compare March 5, 2026 17:35
When glibc isn't compatible (Alpine, NixOS, Docker scratch images),
the npm install script falls back to a static musl binary. However,
no musl target was configured in dist-workspace.toml, causing the
fallback to fail with "Platform not supported".

Fixes googleworkspace#86
@Bortlesboat Bortlesboat force-pushed the fix/linux-npm-install branch from c6d7ee0 to 83256ba Compare March 5, 2026 18:16
@jpoehnelt jpoehnelt added area: distribution cla: yes This human has signed the Contributor License Agreement. complexity: low Small, straightforward change labels Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: distribution cla: yes This human has signed the Contributor License Agreement. complexity: low Small, straightforward change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to install from npm: Platform with type "Linux" and architecture "x64" is not supported

2 participants