You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: add Bun runtime support (bun test, bun run, bunx) #832
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 test → rtk bun test
bun run <script> → rtk bun run <script>
bun install → rtk bun install
bunx <pkg> → rtk bunx <pkg>
bun build → rtk bun build
Implementation
Options:
Rust module (src/bun_cmd.rs) with sub-enum — best for bun test (structured output parsing)
TOML filters for simpler commands (bun install, bun build)
Hybrid — Rust for test, TOML for the rest
References
Vitest module (similar test runner): src/vitest_cmd.rs
Hi @pszymkowiak, I’d like to work on this feature. I have experience working with Node.js tooling and some familiarity with Bun as well. I can implement the Bun command support, including rewrite rules and required modules. Let me know if I can take this up.
Feature request to add Bun runtime support (bun test/run/install/build, bunx); partially addressed by PR #1128 — monitor PR progress before merging or closing.
📁 Relevant files
src/bun_cmd.rs
src/vitest_cmd.rs
src/pnpm_cmd.rs
src/npm_cmd.rs
Triaged automatically by wshm · This is an automated analysis, not a human review.
Production validation from a Bun + Elysia.js monorepo
Adding real numbers to validate demand. From rtk discover (30-day scan, 13,730 Bash calls):
Command
Monthly runs
Example
bun test
64
bun test 2>&1
Our bun test output is identical in structure to vitest — TAP-style pass/fail lines with a summary footer. The rtk vitest filtering logic should port directly.
What we'd want
rtk bun test
Failures-only mode (mirror rtk jest / rtk vitest): suppress passing test lines, keep errors + stack traces
Summary: N tests passed, M failed, K skipped
Exit code pass-through so CI sees the real result
Rewrite rule needed
Hook should rewrite bun test → rtk bun test (currently falls through as unhandled).
Stack context
Bun 1.2.19 + Elysia.js + Prisma monorepo. We run bun test for API integration tests every session. Currently 100% of that output lands unfiltered in context.
Bun support landed in #988 and is on develop. rtk bun test, rtk bun run, rtk bun install, rtk bun build and rtk bunx all exist, and the hook rewrites the corresponding raw commands. Verified against a real bun test run: only failures plus the summary are kept, passing lines are dropped. Please reopen or comment if you still see unfiltered Bun output on the latest version.
Activity
harmeshgv commentedon Mar 25, 2026
Hi @pszymkowiak, I’d like to work on this feature. I have experience working with Node.js tooling and some familiarity with Bun as well. I can implement the Bun command support, including rewrite rules and required modules. Let me know if I can take this up.
pszymkowiak commentedon Mar 26, 2026
🔍 Automated Triage
featuremediumSummary
Feature request to add Bun runtime support (bun test/run/install/build, bunx); partially addressed by PR #1128 — monitor PR progress before merging or closing.
📁 Relevant files
src/bun_cmd.rssrc/vitest_cmd.rssrc/pnpm_cmd.rssrc/npm_cmd.rsTriaged automatically by wshm · This is an automated analysis, not a human review.
XtheWiz commentedon Apr 19, 2026
Production validation from a Bun + Elysia.js monorepo
Adding real numbers to validate demand. From
rtk discover(30-day scan, 13,730 Bash calls):bun testbun test 2>&1Our
bun testoutput is identical in structure to vitest — TAP-style pass/fail lines with a summary footer. Thertk vitestfiltering logic should port directly.What we'd want
rtk bun testrtk jest/rtk vitest): suppress passing test lines, keep errors + stack tracesN tests passed, M failed, K skippedRewrite rule needed
Hook should rewrite
bun test→rtk bun test(currently falls through as unhandled).Stack context
Bun 1.2.19 + Elysia.js + Prisma monorepo. We run
bun testfor API integration tests every session. Currently 100% of that output lands unfiltered in context.HenriqueSchroeder commentedon Apr 22, 2026
#1374
KuSh commentedon Sep 5, 2026
Bun support landed in #988 and is on develop.
rtk bun test,rtk bun run,rtk bun install,rtk bun buildandrtk bunxall exist, and the hook rewrites the corresponding raw commands. Verified against a realbun testrun: only failures plus the summary are kept, passing lines are dropped. Please reopen or comment if you still see unfiltered Bun output on the latest version.