Skip to content

chore: Update fff to 0.9.4#31583

Merged
thdxr merged 1 commit into
anomalyco:devfrom
dmtrKovalenko:bump/fff-0.9.4
Jun 10, 2026
Merged

chore: Update fff to 0.9.4#31583
thdxr merged 1 commit into
anomalyco:devfrom
dmtrKovalenko:bump/fff-0.9.4

Conversation

@dmtrKovalenko

@dmtrKovalenko dmtrKovalenko commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #31584

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Bumps @ff-labs/fff-bun from 0.9.3 to 0.9.4 and wires up the new embedded-lib resolution it introduces.

0.9.4 embeds its native library into bun build --compile output via a type: "file" import plus a build-time FFF_LIBC constant (gnu/musl), since libc cannot be detected at build time on Linux. When the define is missing, the embedded resolver falls back to gnu, so musl Linux binaries would embed the wrong .so. This PR:

  • Updates the dependency and lockfile to 0.9.4.
  • Passes FFF_LIBC via bun build --define for Linux targets in both binary build scripts that bundle fff: packages/opencode/script/build.ts and packages/cli/script/build.ts, mirroring the existing OPENCODE_LIBC/OPENTUI_LIBC handling (defaults to gnu, musl for the abi-specific builds).
  • Adds a declare global for FFF_LIBC next to the fff wrapper so type checking of the package's embedded.ts resolves the constant when consumed from source.

How did you verify your code works?

  • bun typecheck passes for both opencode and cli (previously failed with Cannot find name 'FFF_LIBC').
  • Ran fff/filesystem/tool tests in packages/opencode and packages/core (glob, grep, read, filesystem search) — all pass.
  • Built standalone binaries for both opencode and cli (build.ts --single) and confirmed the fff native lib is embedded (/$bunfs/root/libfff_c-*.dylib) and loads at runtime: opencode debug file search returns correct results from the compiled binary.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added contributor needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@dmtrKovalenko dmtrKovalenko force-pushed the bump/fff-0.9.4 branch 3 times, most recently from e1aca08 to 80df230 Compare June 10, 2026 00:57
Fixed bun --compile binary embedding
@thdxr thdxr enabled auto-merge (squash) June 10, 2026 02:26
@thdxr thdxr disabled auto-merge June 10, 2026 02:28
@thdxr thdxr merged commit e9e2612 into anomalyco:dev Jun 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiled binary does not embed fff native library (bun --compile)

2 participants