rtk-ai/rtk

feat: add Bun runtime support (bun test, bun run, bunx)

Open

#832 aperta il 25 mar 2026

Vedi su GitHub
 (4 commenti) (12 reazioni) (0 assegnatari)Rust (2914 fork)batch import
area:clieffort-largeeffort-mediumenhancementhelp wantedpriority:medium

Metriche repository

Star
 (48.085 star)
Metriche merge PR
 (Merge medio 11g 1h) (45 PR mergiate in 30 g)

Descrizione

Context

Bun is a fast JavaScript runtime used as the default in many modern projects. RTK has no support for it — no Rust module, no TOML filter, no rewrite rule.

RTK already supports Node.js ecosystem tools (npm, pnpm, vitest, tsc, eslint, prettier, next, playwright, prisma) but the Bun equivalents are missing.

Scope

Command Description Expected savings
rtk bun test Bun's built-in test runner (similar to vitest) 85-90%
rtk bun run <script> Script runner (similar to npm run) 70-80%
rtk bun install Package install (similar to pnpm install) 80-90%
rtk bunx <pkg> Package executor (similar to npx) 70-80%
rtk bun build Bundler output 75-85%

Rewrite rules

The hook should rewrite:

  • bun testrtk bun test
  • bun run <script>rtk bun run <script>
  • bun installrtk bun install
  • bunx <pkg>rtk bunx <pkg>
  • bun buildrtk bun build

Implementation

Options:

  1. Rust module (src/bun_cmd.rs) with sub-enum — best for bun test (structured output parsing)
  2. TOML filters for simpler commands (bun install, bun build)
  3. Hybrid — Rust for test, TOML for the rest

References

  • Vitest module (similar test runner): src/vitest_cmd.rs
  • pnpm module (similar package manager): src/pnpm_cmd.rs
  • npm module: src/npm_cmd.rs

Guida contributor