Problem
Node monorepos cannot adopt scripts as a pinned project tool without requiring every developer and CI image to install Rust or run a separate global cargo install scripts_runner step.
A project-local npm dependency would make installation automatic, keep the version in the lockfile, and allow package scripts to invoke pnpm exec scripts.
Proposal
Publish a small npm launcher package plus platform-specific packages containing prebuilt scripts binaries. Follow the packaging model used by tools such as esbuild:
- The launcher exposes the
scripts command through package.json#bin.
- Platform packages contain one native binary and declare matching
os and cpu fields.
- The launcher lists platform packages as optional dependencies and selects the installed binary at runtime.
- All packages use the same version and are published from the existing tag release workflow.
- Unsupported platforms receive an actionable error that lists supported targets and the
cargo install scripts_runner fallback.
- Avoid a postinstall network download. Let npm, pnpm, or Yarn fetch and verify the platform package.
Initial targets can match the existing GitHub release support, with architecture made explicit. At minimum, consider macOS ARM64, macOS x64, and Linux x64 if CI can build them reliably.
Acceptance criteria
pnpm add -D <package> installs a pinned project-local scripts executable without Rust.
pnpm exec scripts --version runs on every published target.
- Only the package for the current operating system and architecture is installed.
- npm package versions match the Rust crate and GitHub release tag.
- The release workflow tests each packaged binary before publication.
- Installation works in CI without a global install step.
- The README documents npm, pnpm, and Yarn usage alongside Cargo installation.
Problem
Node monorepos cannot adopt
scriptsas a pinned project tool without requiring every developer and CI image to install Rust or run a separate globalcargo install scripts_runnerstep.A project-local npm dependency would make installation automatic, keep the version in the lockfile, and allow package scripts to invoke
pnpm exec scripts.Proposal
Publish a small npm launcher package plus platform-specific packages containing prebuilt
scriptsbinaries. Follow the packaging model used by tools such as esbuild:scriptscommand throughpackage.json#bin.osandcpufields.cargo install scripts_runnerfallback.Initial targets can match the existing GitHub release support, with architecture made explicit. At minimum, consider macOS ARM64, macOS x64, and Linux x64 if CI can build them reliably.
Acceptance criteria
pnpm add -D <package>installs a pinned project-localscriptsexecutable without Rust.pnpm exec scripts --versionruns on every published target.