Problem
The npm installer generated by cargo-dist uses a JS downloader approach that brings in 5 direct runtime dependencies:
This results in 41 packages installed for what is fundamentally a single static binary. For comparison, tools like esbuild, swc, and biome use platform-specific optional dependencies (@esbuild/linux-x64, etc.) that contain the binary directly — zero runtime JS dependencies, no postinstall download step.
$ npm install @silafood/runsteps@0.1.0
41 packages installed
Suggestion
Consider offering a bundled binary strategy (as described in #450) where:
- Platform-specific packages (
@scope/tool-linux-x64, @scope/tool-darwin-arm64, etc.) each contain the prebuilt binary
- The root package lists them as
optionalDependencies
- npm/bun/pnpm automatically picks the right one for the platform
This eliminates:
- All 5 runtime dependencies (axios, detect-libc, rimraf, console.table, axios-proxy-builder)
- The postinstall download step (binary is already in the package)
- Network failures during install (no GitHub fetch at install time)
- The 41-package dependency tree
Current workaround
Using the shell installer (curl | sh) or Homebrew instead of npm, since those have zero dependencies.
Environment
- cargo-dist 0.31.0
installers = ["shell", "npm", "homebrew"]
Problem
The npm installer generated by cargo-dist uses a JS downloader approach that brings in 5 direct runtime dependencies:
axios(+axios-proxy-builder)console.table(unused — already a Node built-in since v10, see Deps: Is console.table necessary? #2224)detect-libcrimrafThis results in 41 packages installed for what is fundamentally a single static binary. For comparison, tools like esbuild, swc, and biome use platform-specific optional dependencies (
@esbuild/linux-x64, etc.) that contain the binary directly — zero runtime JS dependencies, no postinstall download step.Suggestion
Consider offering a bundled binary strategy (as described in #450) where:
@scope/tool-linux-x64,@scope/tool-darwin-arm64, etc.) each contain the prebuilt binaryoptionalDependenciesThis eliminates:
Current workaround
Using the shell installer (
curl | sh) or Homebrew instead of npm, since those have zero dependencies.Environment
installers = ["shell", "npm", "homebrew"]