Repository navigation
Bump Bun to 1.4.1 and add --bytecode to compiled binaries - #2
Conversation
- Update packageManager from bun@1.4.0 to bun@1.4.1 - Tighten engines.bun to >=1.4.1 in packages/tcut - Add --bytecode flag to build script and build-binaries.ts - Update README install blurbs to note Bun ≥ 1.4.1 requirement The --bytecode flag, now working with cross-compile in Bun 1.4.1, pre-compiles JavaScript to bytecode for faster startup: - Startup time: ~12ms vs ~29ms (2.4x faster) - Binary size: 84MB vs 82MB (+2MB for pre-compiled bytecode) Cross-compile verified for bun-windows-x64 and bun-darwin-arm64. Co-authored-by: Aman Varshney <amanvarshney.work@gmail.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
WalkthroughChangesThe project now requires Bun 1.4.1. Production and cross-platform compiled builds now enable Bun bytecode generation. Bun build updates
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d5a8e2c4a9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ], | ||
| "engines": { | ||
| "bun": ">=1.4.0" | ||
| "bun": ">=1.4.1" |
There was a problem hiding this comment.
Align all published guidance with the new Bun minimum
After tightening the engine requirement to Bun 1.4.1, users consulting packages/tcut/docs/llms.txt:4, packages/tcut/docs/REFERENCE.md:138, or the installation text in apps/web/src/routes/index.tsx:94 are still told that Bun 1.4 is supported. This leaves the public installation surfaces contradictory and can direct Bun 1.4.0 users to install a package whose declared engine excludes their runtime; update those remaining references together with this minimum.
Useful? React with 👍 / 👎.
Summary
Updates the monorepo to Bun 1.4.1 and enables the
--bytecodeflag for all compiled binaries, taking advantage of the cross-compile + bytecode fix in Bun 1.4.1.Changes
package.json:packageManagerbumped frombun@1.4.0tobun@1.4.1packages/tcut/package.json:engines.buntightened to>=1.4.1buildscript now uses--bytecodeflagpackages/tcut/scripts/build-binaries.ts: Added--bytecodeto cross-compile argsBun ≥ 1.4.1Smoke Test Results
All 137 tests pass on Bun 1.4.1.
Binary Size Comparison (linux-x64, native build)
--bytecode--bytecodeThe +2 MB is the pre-compiled bytecode embedded in the binary.
Startup Time Comparison
--help)--bytecode--bytecode~2.4x faster startup with bytecode.
Cross-Compile Verification
Successfully cross-compiled with
--bytecodeto:bun-windows-x64(89 MB)bun-darwin-arm64(66 MB)This confirms the Bun 1.4.1 fix for cross-compile + bytecode works correctly.
Why Bytecode?
From the Bun 1.4.1 blog:
--compilestartup (pre-compiles JS to bytecode)--bytecodenow works (previously broken)The faster startup is particularly beneficial for CLI tools like tcut where users run many short-lived commands.
Summary by CodeRabbit
Documentation
Chores