Commit 1462953
feat: add Linux musl target support (#995)
## Summary
Add build, publish, and CI support for Linux musl targets
(`x86_64-unknown-linux-musl` and `aarch64-unknown-linux-musl`), enabling
vite-plus to run in Alpine/musl-based Docker containers.
- Add musl NAPI binding targets to package.json and release workflow
- Cross-compile musl binaries using `cargo-zigbuild` (napi-cross only
supports gnu)
- Download musl Node.js from `unofficial-builds.nodejs.org` (official
nodejs.org only provides glibc)
- Add `test-musl` CI job running cargo check/test in Alpine container
- Add `cli-e2e-test-musl` CI job with snap tests in Alpine Docker
- Add musl standalone install tests (`test-standalone-install.yml`)
- Add libc filter support to snap test `ignoredPlatforms` (e.g. `{ "os":
"linux", "libc": "musl" }`)
- Replace `cat FILE && exit 1 || true` with portable `test ! -f FILE` in
snap tests
- Add platform support documentation to getting started guide
## Test plan
- [x] `cargo test -p vite_global_cli` — registry test includes musl
- [x] `test-musl` job — cargo check + test in Alpine container
- [x] `cli-e2e-test-musl` job — full E2E with snap tests in Alpine
Docker
- [x] `test-standalone-install.yml` — musl x64 + arm64 install tests
- [x] Release workflow builds 8 targets (6 existing + 2 musl)
Closes #992
---------
Co-authored-by: LongYinan <lynweklm@gmail.com>1 parent a5b2e1f commit 1462953
66 files changed
Lines changed: 611 additions & 255 deletions
File tree
- .github
- actions
- build-upstream
- download-rolldown-binaries
- workflows
- crates
- vite_global_cli/src/commands/upgrade
- vite_install/src
- vite_js_runtime/src/providers
- docs/guide
- packages
- cli
- snap-tests-global
- command-dlx-npm10
- command-pack-exe
- command-upgrade-check
- create-missing-typecheck
- migration-already-vite-plus-with-husky-hookspath
- migration-already-vite-plus-with-husky-lint-staged
- migration-already-vite-plus
- migration-auto-create-vite-config
- migration-baseurl-tsconfig
- migration-eslint-legacy-already-vite-plus
- migration-eslint-lint-staged-mjs
- migration-eslint-lintstagedrc
- migration-eslint-monorepo
- migration-eslint-npx-wrapper
- migration-eslint-rerun-dual-config
- migration-eslint-rerun-mjs
- migration-eslint-rerun
- migration-eslint
- migration-existing-lint-staged-config
- migration-from-tsdown-json-config
- migration-merge-vite-config-js
- migration-merge-vite-config-ts
- migration-monorepo-pnpm
- migration-monorepo-yarn4
- migration-prettier-eslint-combo
- migration-prettier-ignore-unknown
- migration-prettier-rerun
- migration-prettier
- snap-tests
- command-init-inline-config-existing
- command-init-inline-config
- tools/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
62 | 80 | | |
63 | 81 | | |
64 | | - | |
| 82 | + | |
65 | 83 | | |
66 | | - | |
| 84 | + | |
67 | 85 | | |
68 | 86 | | |
69 | 87 | | |
70 | 88 | | |
| 89 | + | |
71 | 90 | | |
72 | 91 | | |
73 | | - | |
| 92 | + | |
74 | 93 | | |
75 | | - | |
| 94 | + | |
76 | 95 | | |
77 | | - | |
| 96 | + | |
78 | 97 | | |
79 | 98 | | |
80 | | - | |
| 99 | + | |
81 | 100 | | |
82 | 101 | | |
83 | 102 | | |
| |||
88 | 107 | | |
89 | 108 | | |
90 | 109 | | |
91 | | - | |
92 | | - | |
| 110 | + | |
| 111 | + | |
93 | 112 | | |
94 | 113 | | |
95 | 114 | | |
96 | 115 | | |
97 | 116 | | |
| 117 | + | |
98 | 118 | | |
99 | 119 | | |
100 | | - | |
101 | | - | |
| 120 | + | |
| 121 | + | |
102 | 122 | | |
103 | 123 | | |
104 | | - | |
| 124 | + | |
105 | 125 | | |
106 | 126 | | |
107 | | - | |
| 127 | + | |
108 | 128 | | |
109 | 129 | | |
110 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | 102 | | |
106 | 103 | | |
107 | 104 | | |
| |||
112 | 109 | | |
113 | 110 | | |
114 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
115 | 149 | | |
116 | 150 | | |
117 | 151 | | |
| |||
146 | 180 | | |
147 | 181 | | |
148 | 182 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | 183 | | |
192 | 184 | | |
193 | 185 | | |
| |||
197 | 189 | | |
198 | 190 | | |
199 | 191 | | |
| 192 | + | |
200 | 193 | | |
| 194 | + | |
201 | 195 | | |
| 196 | + | |
202 | 197 | | |
203 | 198 | | |
204 | 199 | | |
| |||
217 | 212 | | |
218 | 213 | | |
219 | 214 | | |
220 | | - | |
| 215 | + | |
221 | 216 | | |
222 | 217 | | |
223 | 218 | | |
| |||
234 | 229 | | |
235 | 230 | | |
236 | 231 | | |
237 | | - | |
| 232 | + | |
238 | 233 | | |
239 | 234 | | |
240 | | - | |
| 235 | + | |
241 | 236 | | |
242 | 237 | | |
243 | 238 | | |
| |||
395 | 390 | | |
396 | 391 | | |
397 | 392 | | |
398 | | - | |
| 393 | + | |
399 | 394 | | |
400 | 395 | | |
401 | 396 | | |
| |||
577 | 572 | | |
578 | 573 | | |
579 | 574 | | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
580 | 656 | | |
581 | 657 | | |
582 | 658 | | |
| |||
651 | 727 | | |
652 | 728 | | |
653 | 729 | | |
| 730 | + | |
654 | 731 | | |
655 | | - | |
656 | 732 | | |
| 733 | + | |
657 | 734 | | |
658 | 735 | | |
659 | 736 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
| 70 | + | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
0 commit comments