Repository navigation
Conversation
a5def7e to
5156822
Compare
CLI artifact sizes (
|
| Artifact | Format | Base | PR | Change |
|---|---|---|---|---|
| CLI including dependencies (Linux x64 glibc) | Total unpacked | 126.1 MB (79 deps) | 126.1 MB (79 deps) | 0 B (0.00%) |
packages/cli/dist |
Directory total | 2.20 MiB | 2.20 MiB | 0 B (0.00%) |
packages/core/dist |
Directory total | 4.08 MiB | 4.08 MiB | 0 B (0.00%) |
| Combined package dist | Directory total | 6.28 MiB | 6.28 MiB | 0 B (0.00%) |
vp (Linux x64) |
Binary | 10.21 MiB | 7.13 MiB | -3.08 MiB (-30.18%) |
vp (Linux x64) |
gzip -9 | 4.50 MiB | 3.32 MiB | -1.19 MiB (-26.34%) |
| NAPI (Linux x64) | Binary | 34.53 MiB | 34.53 MiB | 0 B (0.00%) |
| NAPI (Linux x64) | gzip -9 | 13.81 MiB | 13.81 MiB | 0 B (0.00%) |
vp (macOS ARM64) |
Binary | 7.62 MiB | 4.72 MiB | -2.90 MiB (-38.00%) |
vp (macOS ARM64) |
gzip -9 | 3.94 MiB | 2.84 MiB | -1.10 MiB (-27.99%) |
| NAPI (macOS ARM64) | Binary | 41.52 MiB | 41.52 MiB | 0 B (0.00%) |
| NAPI (macOS ARM64) | gzip -9 | 17.97 MiB | 17.97 MiB | 0 B (0.00%) |
vp (Windows x64) |
Binary | 8.29 MiB | 5.18 MiB | -3.10 MiB (-37.42%) |
vp (Windows x64) |
gzip -9 | 3.66 MiB | 2.43 MiB | -1.23 MiB (-33.53%) |
| NAPI (Windows x64) | Binary | 30.60 MiB | 30.60 MiB | 0 B (0.00%) |
| NAPI (Windows x64) | gzip -9 | 12.51 MiB | 12.51 MiB | 0 B (0.00%) |
| Trampoline (Windows x64) | Binary | 13.50 KiB | 13.50 KiB | 0 B (0.00%) |
| Trampoline (Windows x64) | gzip -9 | 7.09 KiB | 7.09 KiB | 0 B (0.00%) |
| Installer (Windows x64) | Binary | 3.63 MiB | 3.63 MiB | -1.00 KiB (-0.03%) |
| Installer (Windows x64) | gzip -9 | 1.78 MiB | 1.78 MiB | -178 B (-0.01%) |
Registry bridge build (
|
| Package | Version |
|---|---|
vite-plus |
0.0.0-commit.a4e9c5932e069b5aea5b9c0136222ddada73bed0 |
@voidzero-dev/vite-plus-core |
0.0.0-commit.a4e9c5932e069b5aea5b9c0136222ddada73bed0 |
create-vite-plus |
0.0.0-commit.a4e9c5932e069b5aea5b9c0136222ddada73bed0 |
Install the Vite+ CLI built from this commit, then migrate a project:
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/voidzero-dev/vite-plus/a4e9c5932e069b5aea5b9c0136222ddada73bed0/packages/cli/install.sh | VP_PR_VERSION=3086 VP_LEGACY_INSTALLER_URL=https://raw.githubusercontent.com/voidzero-dev/vite-plus/a4e9c5932e069b5aea5b9c0136222ddada73bed0/packages/cli/install-legacy.sh bash# Windows (PowerShell)
$env:VP_PR_VERSION="3086"; $env:VP_LEGACY_INSTALLER_URL="https://raw.githubusercontent.com/voidzero-dev/vite-plus/a4e9c5932e069b5aea5b9c0136222ddada73bed0/packages/cli/install-legacy.ps1"; irm https://raw.githubusercontent.com/voidzero-dev/vite-plus/a4e9c5932e069b5aea5b9c0136222ddada73bed0/packages/cli/install.ps1 | iexOr download the standalone Windows installer built from this commit:
| Architecture | Installer |
|---|---|
| x64 | vp-setup-x86_64-pc-windows-msvc.exe |
| Arm64 | vp-setup-aarch64-pc-windows-msvc.exe |
GitHub requires you to sign in and downloads each installer as a ZIP artifact. Extract vp-setup.exe, then run it against this preview build:
.\vp-setup.exe --version "0.0.0-commit.a4e9c5932e069b5aea5b9c0136222ddada73bed0" --registry "https://registry-bridge.viteplus.dev/"After installing, upgrade the current project's vite-plus to this test build with:
vp migrateOr create a new project from this commit without installing the CLI:
export npm_config_registry=https://registry-bridge.viteplus.dev/ pnpm_config_registry=https://registry-bridge.viteplus.dev/
pnpm create vite-plus@0.0.0-commit.a4e9c5932e069b5aea5b9c0136222ddada73bed0 # or: npm create vite-plus@0.0.0-commit.a4e9c5932e069b5aea5b9c0136222ddada73bed0$env:npm_config_registry="https://registry-bridge.viteplus.dev/"; $env:pnpm_config_registry="https://registry-bridge.viteplus.dev/"
pnpm create vite-plus@0.0.0-commit.a4e9c5932e069b5aea5b9c0136222ddada73bed0 # or: npm create vite-plus@0.0.0-commit.a4e9c5932e069b5aea5b9c0136222ddada73bed0pnpm 11+ reads pnpm_config_registry, npm and older pnpm read npm_config_registry. The new project pins this build, so keep the registry set for later installs, or configure it as below.
Or point your package manager at the bridge registry https://registry-bridge.viteplus.dev/:
| Package manager | Registry config |
|---|---|
| npm / pnpm / Bun | .npmrc: registry=https://registry-bridge.viteplus.dev/ |
| Yarn (v2+) | .yarnrc.yml: npmRegistryServer: "https://registry-bridge.viteplus.dev/" |
Then pin the build (vite aliases to vite-plus-core; pnpm can use a catalog, npm an overrides entry):
{
"devDependencies": {
"vite-plus": "0.0.0-commit.a4e9c5932e069b5aea5b9c0136222ddada73bed0",
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.a4e9c5932e069b5aea5b9c0136222ddada73bed0"
}
}
🐳 Docker preview imageBuilt from this PR's registry bridge build:
# remove any stale local copy from a previous run, then pull fresh
docker rmi ghcr.io/voidzero-dev/vite-plus:pr-3086 2>/dev/null; docker pull ghcr.io/voidzero-dev/vite-plus:pr-3086Quick check: docker run --rm ghcr.io/voidzero-dev/vite-plus:pr-3086 vp --versionSee docs/guide/docker.md for usage. |
This change reduces the standalone
vpexecutable size with a step-localCARGO_PROFILE_RELEASE_OPT_LEVEL=zoverride. Fat LTO remains enabled for both the standalone executable and the NAPI addon. The addon contains Rolldown and Oxc and keeps its existing release settings.vpexecutableopt-level=3,lto="fat"opt-level="z",lto="fat"opt-level=3,lto="fat"opt-level=3,lto="fat"On Apple M4 Max with macOS ARM64, the executable decreases from 7,991,312 to 4,954,496 bytes (38.0% smaller). The table compares standalone CLI commands from the same source commit,
a4e9c5932, with fat LTO in both builds. These CLI timings do not measure bundling. A separatevp buildcomparison below measures the bundled Rolldown.opt-level=3opt-level="z"vp -V, no local installationvp -V, local package and toolchain manifestvp env current node --jsonvp node -e ''vp env exec npm --versionvp env install 22.13.1, runtime absentThe version command adds 0.05–0.07 ms. Its measurements use 360 runs per binary per workload, in three rounds with randomized execution order. Environment commands add about 0.1–0.2 ms. Fresh Node.js installation adds 59 ms.
These measurements use warm filesystem caches. Installation uses a local mirror and includes signature verification, checksum verification, and extraction. Linux and Windows performance remains unmeasured. The performance report contains details for the environment and installation workloads.
The
vp buildcomparison uses the same native addon, Node.js22.23.2, Vite8.3.4, and Rolldown1.2.14for both variants. Fat LTO stays enabled. Each workload has 60 runs per variant in three rounds with balanced, randomized execution order.vp buildworkloadopt-level=3opt-level="z"threejs10x, 3,693 modulesThese workloads show no consistent slowdown. Differences change sign across rounds, and all 95% confidence intervals include zero. Timings include CLI startup, bundling, and output writes, with warm filesystem caches and no task cache. The Rolldown report includes the runner and raw measurements. These results do not measure disabling fat LTO or changing the NAPI optimization level.
For comparison, the main Rust CLIs in uv and pnpm retain
opt-level=3. Both uselto="fat",codegen-units=1, symbol stripping, no debug information, andpanic="abort". uv usesopt-level="z"for its separateuv-buildbinary.uv's release workflow also uses profile-guided optimization on selected targets. Its macOS builds use LLD to merge identical code. pnpm's release workflow sets
-C force-unwind-tables=nofor the Linux CLI. Its NAPI addon keeps unwind tables and usespanic="unwind".The preview workflow adds a PR comment that compares each binary with the latest stable release. It shows raw sizes, gzip sizes, and changes for all eight targets, including Windows installers and trampolines.
The report uses code from the default branch and reads preview binaries without executing them. It updates the existing comment only while the PR still points to the built commit.
The Linux report uses the npmx unpacked-size metric in decimal MB. It sums package payload bytes and registry
dist.unpackedSizefor production and optional dependencies onlinux-x64-glibc. Each package name contributes once. The resolver followsnpm:aliases, including@voidzero-dev/vite-plus-core.The CLI payload is 2.8 MB. Base and PR both total 126.1 MB with 79 dependencies in the Linux CI report. npmx currently reports 109.5 MB and 67 dependencies. Its resolver omits the core package and 11 dependencies. This report includes them.
The analysis and separate prototype patches in
bench/binary-size/cover the remaining work toward the 50% target for each binary.