Skip to content

Bump Bun to 1.4.1 and add --bytecode to compiled binaries - #2

Merged
AmanVarshney01 merged 1 commit into
mainfrom
aman/bun-1.4.1-bytecode-17d9
Sep 4, 2026
Merged

AmanVarshney01 merged 1 commit into
mainfrom
aman/bun-1.4.1-bytecode-17d9

Conversation

@AmanVarshney01

@AmanVarshney01 AmanVarshney01 commented Sep 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Updates the monorepo to Bun 1.4.1 and enables the --bytecode flag for all compiled binaries, taking advantage of the cross-compile + bytecode fix in Bun 1.4.1.

Changes

  • Root package.json: packageManager bumped from bun@1.4.0 to bun@1.4.1
  • packages/tcut/package.json:
    • engines.bun tightened to >=1.4.1
    • build script now uses --bytecode flag
  • packages/tcut/scripts/build-binaries.ts: Added --bytecode to cross-compile args
  • README.md (root and packages/tcut): Updated install blurb to note Bun ≥ 1.4.1
  • bun.lock: Updated for Bun 1.4.1

Smoke Test Results

All 137 tests pass on Bun 1.4.1.

Binary Size Comparison (linux-x64, native build)

Build Size
Without --bytecode 82 MB
With --bytecode 84 MB

The +2 MB is the pre-compiled bytecode embedded in the binary.

Startup Time Comparison

Build Startup (--help)
Without --bytecode ~29ms
With --bytecode ~12ms

~2.4x faster startup with bytecode.

Cross-Compile Verification

Successfully cross-compiled with --bytecode to:

  • 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:

  • Faster --compile startup (pre-compiles JS to bytecode)
  • Cross-compile with --bytecode now works (previously broken)
  • Smaller bytecode representation

The faster startup is particularly beneficial for CLI tools like tcut where users run many short-lived commands.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Documentation

    • Updated installation guidance to require Bun 1.4.1 or later.
  • Chores

    • Updated the project’s Bun version configuration to 1.4.1.
    • Release builds now produce optimized standalone executables with bytecode compilation enabled across supported platforms.

- 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>
@AmanVarshney01
AmanVarshney01 marked this pull request as ready for review September 4, 2026 18:33
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-04T18:36:35.141353Z d5a8e2c Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@AmanVarshney01
AmanVarshney01 merged commit 3db52d4 into main Sep 4, 2026
5 checks passed
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 550bb7e4-5ab2-4666-8bbc-2fedbf2fdce1

📥 Commits

Reviewing files that changed from the base of the PR and between 1761530 and d5a8e2c.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • README.md
  • package.json
  • packages/tcut/README.md
  • packages/tcut/package.json
  • packages/tcut/scripts/build-binaries.ts

Walkthrough

Changes

The project now requires Bun 1.4.1. Production and cross-platform compiled builds now enable Bun bytecode generation.

Bun build updates

Layer / File(s) Summary
Bun version and package build settings
README.md, package.json, packages/tcut/README.md, packages/tcut/package.json
Installation documentation and package metadata now specify Bun 1.4.1. The production build command adds --bytecode.
Cross-target bytecode builds
packages/tcut/scripts/build-binaries.ts
The per-target bun build --compile command adds --bytecode alongside --minify.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants