Skip to content

fix(opencode): bundle fff native library#31553

Open
thdxr wants to merge 4 commits into
devfrom
fix/opencode-bundle-fff
Open

fix(opencode): bundle fff native library#31553
thdxr wants to merge 4 commits into
devfrom
fix/opencode-bundle-fff

Conversation

@thdxr

@thdxr thdxr commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

  • select the Bun filesystem implementation while retaining Node package conditions
  • patch @ff-labs/fff-bun to expose its platform library through statically analyzable relative require(...) templates
  • embed the FFF native library in compiled standalone binaries

Verification

  • bun typecheck from packages/opencode
  • bun run script/build.ts --single --skip-install --skip-embed-web-ui
  • started the compiled binary with serve --print-logs in tmux
  • requested GET /find/file?query=build.ts and received HTTP 200 with FFF results
  • confirmed no adjacent libfff_c.so is required

Notes

git diff --check reports the two blank unified-diff context lines inside the Bun dependency patch. Those leading spaces are required by Bun's patch parser; removing them makes bun install reject the patch.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@thdxr thdxr enabled auto-merge (squash) June 9, 2026 19:44
@thdxr thdxr disabled auto-merge June 9, 2026 19:49
@thdxr thdxr enabled auto-merge (squash) June 9, 2026 19:49
@rexdotsh

rexdotsh commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

ran into the same issue when building beta, was just about to send a PR..
take a look at this may be while you're testing out fff capabilities? #31556

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