Repository navigation
fix(berd-call): link Swift bridges built by the swiftbuild system - #430
Merged
Merged
Conversation
Newer Xcode defaults `swift build` to the swiftbuild system, which writes products to `<scratch>/out/Products/<Config>`. swift-rs 1.0.7 only adds `<scratch>/<arch>-apple-macosx/<config>` to the link search path, so the BerdMacSpeechBridge and BerdAirPodsBridge static libraries were not found even though `swift build` succeeded. Also emit the new products directory as a link search path. The old layout keeps working because the extra path is simply unused there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Henry <a0d9f90f86da5f023099d22b8e3599af162d9423a422d8f385a12815de879cf2@buzz.block.builderlab.xyz>
johnmatthewtennant
marked this pull request as ready for review
October 23, 2026 18:22
johnmatthewtennant
pushed a commit
that referenced
this pull request
Oct 23, 2026
Main now carries the speech-hold, interim-word and playback-cancel fixes from #429, which this branch and #428 already had in their own form, plus the Swift link-path fix from #430. Conflicts take this branch's versions, with #428's interim words and the final_end coverage fix layered on, so the configurable and learned thresholds stay in place of #429's single fixed VAD threshold. The swiftbuild link-path change from #430 is kept as is. The merged tree matches the combined build that passed the full berd-call suite, plus the two build.rs changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
johnmatthewtennant
pushed a commit
that referenced
this pull request
Oct 23, 2026
Main now carries the speech-hold, interim-word and playback-cancel fixes from #429, which this branch and #428 already had in their own form, plus the Swift link-path fix from #430. Conflicts take this branch's versions, with #428's interim words and the final_end coverage fix layered on, so the configurable and learned thresholds stay in place of #429's single fixed VAD threshold. The swiftbuild link-path change from #430 is kept as is. The merged tree matches the combined build that passed the full berd-call suite, plus the two build.rs changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Henry <a0d9f90f86da5f023099d22b8e3599af162d9423a422d8f385a12815de879cf2@buzz.block.builderlab.xyz>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fresh Berd checkouts fail to build on current Xcode (macOS 27) with:
swift buildsucceeds. The failure is the Rust link step. Newer Xcode defaults SwiftPM to the swiftbuild system, which writes products to<scratch>/out/Products/<Config>. swift-rs 1.0.7 only adds<scratch>/<arch>-apple-macosx/<config>to the link search path, so the library is never found. The rootBerdcrate has the same problem withBerdAirPodsBridge.Both
build.rsfiles now also emitcargo:rustc-link-search=native=$OUT_DIR/swift-rs/<package>/out/Products/<Debug|Release>. On the old layout the extra path is unused, so older Xcode and macOS CI are unaffected. Linux and Windows skip the Swift code entirely.Testing
Each run used a fresh
CARGO_TARGET_DIR, fromsrc-tauriwith the Hermit toolchain on macOS 27 and/Applications/Xcode.app.Before (origin/main):
cargo build -p berd-callfails:could not find native static library BerdMacSpeechBridgecargo build -p Berd(withTAURI_CONFIGas injust tauri-check) fails:could not find native static library BerdAirPodsBridgeAfter:
cargo build -p berd-callpassescargo build --release -p berd-callpassescargo test -p berd-callpassescargo build -p BerdpassesNot verified: an older Xcode that still uses the
<arch>-apple-macosxlayout, and macOS CI.