PR 5479 dropped Bun support because no bun.lock was committed. With
the bun.lock files now committed for all three Studio install
surfaces (previous commit), Bun --frozen-lockfile becomes a
viable fast path again -- ~5-10x faster than npm ci in practice
(measured locally: frontend 1.4s vs 8s, oxc 35ms vs 371ms, studio
14ms vs 444ms).
Install logic per surface (studio/setup.sh, studio/setup.ps1,
build.sh):
1. If bun.lock exists AND `bun` is on PATH:
try `bun install --frozen-lockfile`
verify critical binaries are present (tsc + vite for frontend,
oxc-parser for oxc validator) -- workaround for the known
bun-cache-corruption bug where install can exit 0 but leave
binaries missing
on validation failure: rm -rf node_modules + clear bun cache,
fall through to npm ci
2. Else (no bun.lock, no bun, or bun failed):
`npm ci` against the committed package-lock.json
Both paths run lockfile-strict, so the install is byte-reproducible
from whichever lockfile the chosen package manager understands. The
build always runs through Node (`npm run build`) -- avoids bun
runtime quirks on some platforms.
Bun auto-install via `npm install -g bun` is NOT restored: a user
who wants the speed-up installs Bun themselves, and the npm ci path
remains the default-available install route. This matches the
upstream Studio docs' install instructions.
|
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| src-tauri | ||
| __init__.py | ||
| bun.lock | ||
| install_llama_prebuilt.py | ||
| install_python_stack.py | ||
| LICENSE.AGPL-3.0 | ||
| package-lock.json | ||
| package.json | ||
| setup.bat | ||
| setup.ps1 | ||
| setup.sh | ||
| Unsloth_Studio_Colab.ipynb | ||