Description
The compiled opencode binary (built with bun build --compile) does not embed the @ff-labs/fff-bun native library correctly. bun --compile only bundles statically analyzable imports, and fff resolves its native lib at runtime, so the embedded path was missing/incorrect in the standalone binary. This breaks fff-backed file search (glob/grep/file search) in released binaries.
fff 0.9.4 adds an embedded-lib resolution path that references native libs via type: "file" imports plus a build-time FFF_LIBC constant (gnu/musl) so Bun embeds them into the compiled binary. We need to bump to 0.9.4 and wire up the FFF_LIBC define in the opencode build for linux targets.
OpenCode version
dev (HEAD)
Steps to reproduce
- Build a standalone binary:
./packages/opencode/script/build.ts --single
- Run fff-backed search from the compiled binary (e.g.
opencode debug file search <query>)
- Native lib fails to load in the compiled binary
Operating System
macOS / Linux (gnu + musl)
Description
The compiled
opencodebinary (built withbun build --compile) does not embed the@ff-labs/fff-bunnative library correctly.bun --compileonly bundles statically analyzable imports, and fff resolves its native lib at runtime, so the embedded path was missing/incorrect in the standalone binary. This breaks fff-backed file search (glob/grep/file search) in released binaries.fff 0.9.4 adds an embedded-lib resolution path that references native libs via
type: "file"imports plus a build-timeFFF_LIBCconstant (gnu/musl) so Bun embeds them into the compiled binary. We need to bump to 0.9.4 and wire up theFFF_LIBCdefine in the opencode build for linux targets.OpenCode version
dev (HEAD)
Steps to reproduce
./packages/opencode/script/build.ts --singleopencode debug file search <query>)Operating System
macOS / Linux (gnu + musl)