Skip to content

fix(cffi): consolidate call_function and call_handle APIs, which had diverged - #4245

Merged
sxlijin merged 1 commit into
canaryfrom
agent/unify-cffi-call-targets
Jul 28, 2026
Merged

sxlijin merged 1 commit into
canaryfrom
agent/unify-cffi-call-targets

Conversation

@sxlijin

@sxlijin sxlijin commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Move named-function and function-handle selection into CallFunctionArgs.call_target.
  • Route both targets through the existing call_function C ABI export and remove the appended call_handle surface.
  • Update the native, WASM, Python, Node, browser, Workers, Go, C++, Rust, Swift, C#, and Java bridge layers plus generated protobuf/header artifacts.
  • Add protoc-gen-swift to the mise toolchain so the Swift SDK bindings can be regenerated locally.

Review follow-up from #4220

  • Bind returned-callable required parameters positionally, while keeping supplied optionals name-keyed and presence-aware; the shared fixture deliberately gives the declared parameter and closure implementation different names so every SDK exercises this behavior.
  • Keep Go handle owners alive through dispatch and make returned Go closures accept and propagate context.Context.
  • Represent Rust optional callable parameters with OptionalArg<T>, reject empty wire parameter names, document unsafe handle dispatch, and add handle lifetime/arity/omission tests.
  • Give unnamed Java required parameters canonical argN names and fail generation explicitly for optional returned callables until Java can preserve omitted versus explicit-null values.
  • Address the remaining C++, C#, Go generator, runtime safety, and reproducible mise-tool review comments with focused tests.

Review follow-up from #4245

  • Bump the BamlApiV1 function-table ABI revision to 2 so revision-1 hosts and runtimes reject the changed call_function pointer signature before reading the slot.
  • Classify type_args supplied with a function-handle target and omitted required callable arguments as invalid arguments across the shared outbound error path.
  • Keep Rust raw ABI slots nullable until validation and make both Rust and C++ reject every null required table operation before use.
  • Require Go call encoders to carry both an explicit target and nonzero call ID, and migrate the legacy Go host-error path to the canonical baml.errors.HostCallable value with same-process error identity.
  • Update generated headers and native loader/test fixtures, including the C# ABI probes and Go mismatch tests, to enforce revision 2 consistently.

Stack

Built on #4220, which has now merged into canary; this PR was rebased onto its merge commit and contains one follow-up commit.

Test plan

  • mise exec -- cargo test -p bridge_cffi --tests
  • mise exec -- cargo test -p baml_bridge -p sdkgen_cpp -p sdkgen_csharp -p bridge_typescript -p bridge_typescript_web -p bridge_python -p bridge_java
  • mise exec -- go test ./... in both sdks/go/baml_go and sdks/go/bridge_go
  • C++ bridge smoke target with warnings-as-errors
  • Managed C# ABI foundation suite plus ABI probe builds
  • Engine regression for positional binding when declared and implementation parameter names differ
  • Complete function_calls matrix across Python, Node, browser, Workers, Go, C++, Rust, Swift, C#, and Java
  • Focused Java and C# returned-closure suites
  • Full workspace mise run clippy, formatting, and repository prek hooks

Summary by CodeRabbit

  • New Features

    • Call requests can now target either a named function or a function handle via the encoded request payload.
    • Named and handle-based calls follow a unified invocation path across supported SDKs and platforms.
  • Breaking Changes

    • Runtime/native call APIs no longer accept function names as separate parameters.
    • Dedicated handle-call entry points were removed.
    • The underlying C ABI for the function table is revised to version 2.
  • Bug Fixes

    • Missing call targets now return a clear invalid-argument error.
    • Function-handle calls that include unsupported type arguments are rejected.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@sxlijin, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a2613ef3-9078-4366-a9e0-2cc559656731

📥 Commits

Reviewing files that changed from the base of the PR and between eaf39f2 and 5797bd1.

⛔ Files ignored due to path filters (16)
  • baml_language/Cargo.lock is excluded by !**/*.lock
  • baml_language/sdks/go/baml_go/internal/cffi/baml_inbound.pb.go is excluded by !**/*.pb.go
  • baml_language/sdks/go/bridge_go/cffi/proto/baml_bridge/cffi/v1/baml_inbound.pb.go is excluded by !**/*.pb.go
  • baml_language/sdks/typescript/bridge_typescript/dist/define_function.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/define_function.js.map is excluded by !**/dist/**, !**/*.map
  • baml_language/sdks/typescript/bridge_typescript/dist/index.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/index.js.map is excluded by !**/dist/**, !**/*.map
  • baml_language/sdks/typescript/bridge_typescript/dist/native.d.ts is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/proto.d.ts is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/proto.d.ts.map is excluded by !**/dist/**, !**/*.map
  • baml_language/sdks/typescript/bridge_typescript/dist/proto.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/proto.js.map is excluded by !**/dist/**, !**/*.map
  • baml_language/sdks/typescript/bridge_typescript/dist/proto/baml_cffi.d.ts is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/proto/baml_cffi.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/stream.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/stream.js.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (94)
  • baml_language/crates/bex_engine/src/lib.rs
  • baml_language/crates/bex_engine/tests/host_value_callable.rs
  • baml_language/crates/bex_project/Cargo.toml
  • baml_language/crates/bex_project/src/bex.rs
  • baml_language/crates/bex_project/src/lib.rs
  • baml_language/crates/bridge_cffi/cbindgen.toml
  • baml_language/crates/bridge_cffi/include/baml_cffi.h
  • baml_language/crates/bridge_cffi/src/api.rs
  • baml_language/crates/bridge_cffi/src/baml_to_host.rs
  • baml_language/crates/bridge_cffi/src/error.rs
  • baml_language/crates/bridge_cffi/src/lib_native.rs
  • baml_language/crates/bridge_cffi/src/lib_wasm.rs
  • baml_language/crates/bridge_cffi/tests/abi_assertions.h
  • baml_language/crates/bridge_cffi/tests/abi_layout.c
  • baml_language/crates/bridge_cffi/tests/abi_layout.rs
  • baml_language/crates/bridge_cffi/tests/unhandled_spawn.rs
  • baml_language/crates/bridge_ctypes/types/baml_bridge/cffi/v1/baml_inbound.proto
  • baml_language/sdk_tests/crates/csharp/phase11_host_callable/Program.cs
  • baml_language/sdk_tests/crates/go/function_calls/customizable/test_host_callables_test.go
  • baml_language/sdk_tests/fixtures/function_calls/baml_src/ns_host_callable_tests/main.baml
  • baml_language/sdks/cpp/bridge_cpp/include/baml/detail/call.h
  • baml_language/sdks/cpp/bridge_cpp/include/baml/detail/loader.h
  • baml_language/sdks/cpp/bridge_cpp/include/baml/detail/proto.h
  • baml_language/sdks/cpp/bridge_cpp/pb/baml_bridge/cffi/v1/baml_inbound.pb.cc
  • baml_language/sdks/cpp/bridge_cpp/pb/baml_bridge/cffi/v1/baml_inbound.pb.h
  • baml_language/sdks/cpp/sdkgen_cpp/src/lib.rs
  • baml_language/sdks/csharp/ABI.md
  • baml_language/sdks/csharp/bridge_csharp/src/Cffi/EncodedCallArguments.cs
  • baml_language/sdks/csharp/bridge_csharp/src/Cffi/NativeApi.cs
  • baml_language/sdks/csharp/bridge_csharp/src/Cffi/NativeTypes.cs
  • baml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.AbiLifetimeProbe/Program.cs
  • baml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.AbiProbe/Program.cs
  • baml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.HostCallable.Tests/Program.cs
  • baml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.ProgramBootstrapProbe/NativeBytecodeInitializer.cs
  • baml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.StreamMediaAbiProbe/NativeBridge.cs
  • baml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.Tests/Program.cs
  • baml_language/sdks/csharp/sdkgen_csharp/src/semantic.rs
  • baml_language/sdks/go/baml_go/function.go
  • baml_language/sdks/go/baml_go/internal/cffi/include/baml_cffi.h
  • baml_language/sdks/go/baml_go/native_darwin_test.go
  • baml_language/sdks/go/baml_go/native_unix.go
  • baml_language/sdks/go/baml_go/native_unsupported.go
  • baml_language/sdks/go/baml_go/native_windows.go
  • baml_language/sdks/go/baml_go/runtime.go
  • baml_language/sdks/go/bridge_go/cffi/bridge.h
  • baml_language/sdks/go/bridge_go/cffi/lib.go
  • baml_language/sdks/go/bridge_go/pkg/host_value.go
  • baml_language/sdks/go/bridge_go/pkg/host_value_internal_test.go
  • baml_language/sdks/go/bridge_go/pkg/proto.go
  • baml_language/sdks/go/bridge_go/pkg/runtime.go
  • baml_language/sdks/go/bridge_go/pkg/tests/call_function_test.go
  • baml_language/sdks/go/bridge_go/pkg/tests/host_callable_test.go
  • baml_language/sdks/go/sdkgen_go/src/lib.rs
  • baml_language/sdks/java/baml_bridge/src/main/java/baml_bridge/BamlFfi.java
  • baml_language/sdks/java/baml_bridge/src/main/java/baml_bridge/internal/ProtoWriter.java
  • baml_language/sdks/java/bridge_java/src/lib.rs
  • baml_language/sdks/java/sdkgen_java/src/emit.rs
  • baml_language/sdks/java/sdkgen_java/src/lib.rs
  • baml_language/sdks/python/rust/bridge_python/src/baml_core/baml_py/__init__.pyi
  • baml_language/sdks/python/rust/bridge_python/src/py_handle.rs
  • baml_language/sdks/python/rust/bridge_python/src/runtime.rs
  • baml_language/sdks/python/src/baml_bridge/__init__.py
  • baml_language/sdks/python/src/baml_bridge/_stream.py
  • baml_language/sdks/python/src/baml_bridge/baml_py.pyi
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_inbound_pb2.py
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_inbound_pb2.pyi
  • baml_language/sdks/python/src/baml_bridge/proto.py
  • baml_language/sdks/rust/bridge_rust/src/capi.rs
  • baml_language/sdks/rust/bridge_rust/src/function.rs
  • baml_language/sdks/rust/bridge_rust/src/runtime.rs
  • baml_language/sdks/rust/bridge_rust/src/wire/baml_bridge.cffi.v1.rs
  • baml_language/sdks/rust/sdkgen_rust/src/translate_ty.rs
  • baml_language/sdks/swift/Sources/BamlBridge/Api.swift
  • baml_language/sdks/swift/Sources/BamlBridge/Encode.swift
  • baml_language/sdks/swift/Sources/BamlBridge/Proto/.generated-from
  • baml_language/sdks/swift/Sources/BamlBridge/Proto/baml_inbound.pb.swift
  • baml_language/sdks/swift/Sources/BamlBridge/Runtime.swift
  • baml_language/sdks/swift/Sources/CBamlBridge/include/baml_cffi.h
  • baml_language/sdks/typescript/bridge_typescript/src/errors.rs
  • baml_language/sdks/typescript/bridge_typescript/src/runtime.rs
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/define_function.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/index.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/native.d.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/proto.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/proto/baml_cffi.d.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/proto/baml_cffi.js
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/stream.ts
  • baml_language/sdks/typescript/bridge_typescript_web/src/errors.rs
  • baml_language/sdks/typescript/bridge_typescript_web/src/runtime.rs
  • baml_language/sdks/typescript/bridge_typescript_web/typescript_src/index.ts
  • baml_language/sdks/typescript/bridge_typescript_web/typescript_src/native.ts
  • baml_language/sdks/typescript/bridge_typescript_web/typescript_src/wasm/bridge_web_core.d.ts
  • mise.toml
  • release/bridge-cffi-public-exports.txt
📝 Walkthrough

Walkthrough

The V1 bridge now carries function names and owned function handles inside protobuf-encoded CallFunctionArgs. The separate function_name parameter and call_handle ABI entrypoint were removed across native bridges and SDKs, with target-aware dispatch and updated ABI validation.

Changes

Unified encoded call-target dispatch

Layer / File(s) Summary
Call-target schema and ABI contract
baml_language/crates/bridge_ctypes/..., baml_language/crates/bridge_cffi/..., baml_language/sdks/*/baml_cffi.h
CallFunctionArgs now contains a call_target oneof for function names or handles, while BamlCallFunctionFn accepts only encoded arguments and BamlApiV1.call_handle is removed.
Native and WASM target dispatch
baml_language/crates/bridge_cffi/src/*, baml_language/sdks/typescript/bridge_typescript*
Bridge entrypoints decode and validate the target, then dispatch through call_and_encode or call_handle_and_encode; missing targets map to invalid-argument errors.
C++ and Rust runtime callers
baml_language/sdks/cpp/..., baml_language/sdks/rust/...
Named and handle calls encode their target into the payload before invoking the unified ABI function.
Go, C#, and Java SDK callers
baml_language/sdks/go/..., baml_language/sdks/csharp/..., baml_language/sdks/java/...
SDK call construction and native wrappers now use payload-only dispatch and remove dedicated handle entrypoints.
Python, TypeScript, and Swift callers
baml_language/sdks/python/..., baml_language/sdks/typescript/..., baml_language/sdks/swift/...
Language bindings encode function names or handles in CallFunctionArgs and call the updated runtime interfaces.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SDK
  participant Runtime
  participant Bridge
  participant Engine
  SDK->>Runtime: Encode CallFunctionArgs with call_target
  Runtime->>Bridge: call_function(encoded_args, callback_id)
  Bridge->>Bridge: Decode and validate call_target
  Bridge->>Engine: Dispatch named or handle call
  Engine-->>SDK: Complete callback result
Loading

Possibly related PRs

Poem

I’m a rabbit with targets tucked in bytes,
Names and handles hop through new routes tonight.
One call function carries them both,
Old handle paths vanish like frost.
Protobuf ears twitch, callbacks sing—
Unified bridges spring!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 78.46% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main CFFI change: consolidating call_function and call_handle into a unified API.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/unify-cffi-call-targets

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.

@vercel

vercel Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
beps Ready Ready Preview, Comment Jul 28, 2026 11:17pm
promptfiddle Ready Ready Preview, Comment Jul 28, 2026 11:17pm
promptfiddle2 Ready Ready Preview, Comment Jul 28, 2026 11:17pm

Request Review

@github-actions

Copy link
Copy Markdown

⏭️ Performance benchmarks were skipped

Perf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to canary/main.

To run them on this PR, do any of the following, then push a commit (or re-run CI):

  • Add RUN_CODSPEED=1 to the PR description, or
  • Include run-perf or /perf in the PR title or any commit message.

@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 20:00 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 28, 2026 20:07 Inactive
@sxlijin
sxlijin force-pushed the agent/unify-cffi-call-targets branch from f552811 to b2e298a Compare July 28, 2026 20:09
@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 20:11 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 28, 2026 20:19 Inactive
@github-actions

github-actions Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

Binary size checks passed

✅ 7 passed

Artifact Platform File Gzip Gated on Baseline Delta Status
✅ baml-cli Linux 🔒 27.3 MB 11.6 MB file 27.3 MB +27.1 KB (+0.1%) OK
✅ packed-program Linux 🔒 17.7 MB 7.3 MB file 17.7 MB +12.3 KB (+0.1%) OK
✅ baml-cli macOS 🔒 21.2 MB 10.2 MB file 21.2 MB +16.6 KB (+0.1%) OK
✅ packed-program macOS 🔒 13.9 MB 6.4 MB file 13.9 MB +32 B (+0.0%) OK
✅ baml-cli Windows 🔒 22.9 MB 10.4 MB file 22.9 MB +20.0 KB (+0.1%) OK
✅ packed-program Windows 🔒 14.8 MB 6.5 MB file 14.8 MB +5.6 KB (+0.0%) OK
✅ bridge_wasm WASM 16.6 MB 🔒 4.5 MB gzip 4.5 MB +11.0 KB (+0.2%) OK

🔒 = the size this artifact is GATED on (ceiling + delta). Binaries gate on file size (installed binary); WASM gates on gzip (download size). The other size is shown for information only.


Generated by cargo size-gate · workflow run

Base automatically changed from agent/bridge-closures to canary July 28, 2026 20:25
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 28, 2026 20:28 Inactive
@sxlijin
sxlijin force-pushed the agent/unify-cffi-call-targets branch from b2e298a to 8f27930 Compare July 28, 2026 20:29
@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 20:30 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 28, 2026 20:38 Inactive
@sxlijin
sxlijin marked this pull request as ready for review July 28, 2026 20:44
@sxlijin sxlijin changed the title Consolidate CFFI call targets fix(cffi): consolidate call_function and call_handle APIs, which had diverged Jul 28, 2026

@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: 8f27930efd

ℹ️ 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".

Comment on lines +96 to +97
pub type BamlCallFunctionFn =
extern "C" fn(encoded_args: *const u8, length: usize, callback_id: u32);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the V1 call_function ABI

Keep the existing four-argument function-pointer signature or introduce a new ABI version/append-only entry. BamlApiV1 explicitly promises that existing fields never change type, but this changes call_function while leaving BAML_API_V1_ABI_VERSION at 1; therefore a host and runtime built from different revisions can pass the compatibility check and invoke this slot with different argument layouts. For example, a new host loading the preceding V1 table passes only three arguments to the old implementation, which interprets the protobuf pointer as a C string and the length as a pointer, leading to out-of-bounds reads or undefined behavior rather than a controlled incompatibility error.

Useful? React with 👍 / 👎.

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 28, 2026 20:52 Inactive

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
baml_language/sdks/java/bridge_java/src/lib.rs (1)

33-40: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add unit tests for the new target-dispatch branches.

The new logic — missing-call_target error, the FunctionHandle+type_args rejection, and the FunctionName/FunctionHandle dispatch match in both call_sync_to_bytes and spawn_async_call — is unit-testable in isolation but has no accompanying tests in this diff.

Note: I can't execute cargo test --lib in this sandboxed review environment (no Rust toolchain available), so please run it locally/in CI per the repository's Rust guideline.
Based on coding guidelines: "Prefer writing Rust unit tests over integration tests where possible" and "Always run cargo test --lib if you changed any Rust code."

Also applies to: 48-76, 84-121, 332-382

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/sdks/java/bridge_java/src/lib.rs` around lines 33 - 40, In the
Rust bridge unit-test module, add focused tests covering the new target-dispatch
behavior in call_sync_to_bytes and spawn_async_call: missing call_target errors,
rejection of FunctionHandle with type_args, and matching FunctionName versus
FunctionHandle dispatch paths. Use existing test helpers and assertion
conventions, then run cargo test --lib locally or in CI.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@baml_language/crates/bridge_cffi/src/lib_native.rs`:
- Around line 158-162: Introduce an invalid-argument-classified BridgeError
variant in bridge_cffi::error for unsupported type_args on FunctionHandle
targets, then use it at the decode checks in
baml_language/crates/bridge_cffi/src/lib_native.rs:158-162,
baml_language/crates/bridge_cffi/src/lib_wasm.rs:51-55, and
baml_language/sdks/typescript/bridge_typescript/src/runtime.rs:186-190. Apply
the same substitution in the mirrored Python and Java decode helpers so all
decode paths classify this caller input consistently.

In `@baml_language/sdks/python/src/baml_bridge/proto.py`:
- Around line 517-526: Require exactly one call target in both encoders: update
the Python encoder around the existing function_name/function_handle validation
in proto.py lines 517-526 and the TypeScript encoder’s corresponding
target-option validation in proto.ts lines 308-330 to reject cases where both
selectors are absent, while preserving rejection when both are provided.

---

Nitpick comments:
In `@baml_language/sdks/java/bridge_java/src/lib.rs`:
- Around line 33-40: In the Rust bridge unit-test module, add focused tests
covering the new target-dispatch behavior in call_sync_to_bytes and
spawn_async_call: missing call_target errors, rejection of FunctionHandle with
type_args, and matching FunctionName versus FunctionHandle dispatch paths. Use
existing test helpers and assertion conventions, then run cargo test --lib
locally or in CI.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: edcddbeb-a24c-47f0-b6de-bfc89f81c0bc

📥 Commits

Reviewing files that changed from the base of the PR and between 384a6ff and 8f27930.

⛔ Files ignored due to path filters (15)
  • baml_language/sdks/go/baml_go/internal/cffi/baml_inbound.pb.go is excluded by !**/*.pb.go
  • baml_language/sdks/go/bridge_go/cffi/proto/baml_bridge/cffi/v1/baml_inbound.pb.go is excluded by !**/*.pb.go
  • baml_language/sdks/typescript/bridge_typescript/dist/define_function.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/define_function.js.map is excluded by !**/dist/**, !**/*.map
  • baml_language/sdks/typescript/bridge_typescript/dist/index.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/index.js.map is excluded by !**/dist/**, !**/*.map
  • baml_language/sdks/typescript/bridge_typescript/dist/native.d.ts is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/proto.d.ts is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/proto.d.ts.map is excluded by !**/dist/**, !**/*.map
  • baml_language/sdks/typescript/bridge_typescript/dist/proto.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/proto.js.map is excluded by !**/dist/**, !**/*.map
  • baml_language/sdks/typescript/bridge_typescript/dist/proto/baml_cffi.d.ts is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/proto/baml_cffi.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/stream.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/stream.js.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (65)
  • baml_language/crates/bridge_cffi/cbindgen.toml
  • baml_language/crates/bridge_cffi/include/baml_cffi.h
  • baml_language/crates/bridge_cffi/src/api.rs
  • baml_language/crates/bridge_cffi/src/baml_to_host.rs
  • baml_language/crates/bridge_cffi/src/error.rs
  • baml_language/crates/bridge_cffi/src/lib_native.rs
  • baml_language/crates/bridge_cffi/src/lib_wasm.rs
  • baml_language/crates/bridge_cffi/tests/abi_assertions.h
  • baml_language/crates/bridge_cffi/tests/abi_layout.c
  • baml_language/crates/bridge_cffi/tests/abi_layout.rs
  • baml_language/crates/bridge_ctypes/types/baml_bridge/cffi/v1/baml_inbound.proto
  • baml_language/sdks/cpp/bridge_cpp/include/baml/detail/call.h
  • baml_language/sdks/cpp/bridge_cpp/include/baml/detail/loader.h
  • baml_language/sdks/cpp/bridge_cpp/include/baml/detail/proto.h
  • baml_language/sdks/cpp/bridge_cpp/pb/baml_bridge/cffi/v1/baml_inbound.pb.cc
  • baml_language/sdks/cpp/bridge_cpp/pb/baml_bridge/cffi/v1/baml_inbound.pb.h
  • baml_language/sdks/csharp/bridge_csharp/src/Cffi/EncodedCallArguments.cs
  • baml_language/sdks/csharp/bridge_csharp/src/Cffi/NativeApi.cs
  • baml_language/sdks/csharp/bridge_csharp/src/Cffi/NativeTypes.cs
  • baml_language/sdks/go/baml_go/internal/cffi/include/baml_cffi.h
  • baml_language/sdks/go/baml_go/native_unix.go
  • baml_language/sdks/go/baml_go/native_unsupported.go
  • baml_language/sdks/go/baml_go/native_windows.go
  • baml_language/sdks/go/baml_go/runtime.go
  • baml_language/sdks/go/bridge_go/cffi/bridge.h
  • baml_language/sdks/go/bridge_go/cffi/lib.go
  • baml_language/sdks/go/bridge_go/pkg/proto.go
  • baml_language/sdks/go/bridge_go/pkg/runtime.go
  • baml_language/sdks/java/baml_bridge/src/main/java/baml_bridge/BamlFfi.java
  • baml_language/sdks/java/baml_bridge/src/main/java/baml_bridge/internal/ProtoWriter.java
  • baml_language/sdks/java/bridge_java/src/lib.rs
  • baml_language/sdks/python/rust/bridge_python/src/baml_core/baml_py/__init__.pyi
  • baml_language/sdks/python/rust/bridge_python/src/py_handle.rs
  • baml_language/sdks/python/rust/bridge_python/src/runtime.rs
  • baml_language/sdks/python/src/baml_bridge/__init__.py
  • baml_language/sdks/python/src/baml_bridge/_stream.py
  • baml_language/sdks/python/src/baml_bridge/baml_py.pyi
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_inbound_pb2.py
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_inbound_pb2.pyi
  • baml_language/sdks/python/src/baml_bridge/proto.py
  • baml_language/sdks/rust/bridge_rust/src/capi.rs
  • baml_language/sdks/rust/bridge_rust/src/runtime.rs
  • baml_language/sdks/rust/bridge_rust/src/wire/baml_bridge.cffi.v1.rs
  • baml_language/sdks/swift/Sources/BamlBridge/Api.swift
  • baml_language/sdks/swift/Sources/BamlBridge/Encode.swift
  • baml_language/sdks/swift/Sources/BamlBridge/Proto/.generated-from
  • baml_language/sdks/swift/Sources/BamlBridge/Proto/baml_inbound.pb.swift
  • baml_language/sdks/swift/Sources/BamlBridge/Runtime.swift
  • baml_language/sdks/swift/Sources/CBamlBridge/include/baml_cffi.h
  • baml_language/sdks/typescript/bridge_typescript/src/errors.rs
  • baml_language/sdks/typescript/bridge_typescript/src/runtime.rs
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/define_function.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/index.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/native.d.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/proto.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/proto/baml_cffi.d.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/proto/baml_cffi.js
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/stream.ts
  • baml_language/sdks/typescript/bridge_typescript_web/src/errors.rs
  • baml_language/sdks/typescript/bridge_typescript_web/src/runtime.rs
  • baml_language/sdks/typescript/bridge_typescript_web/typescript_src/index.ts
  • baml_language/sdks/typescript/bridge_typescript_web/typescript_src/native.ts
  • baml_language/sdks/typescript/bridge_typescript_web/typescript_src/wasm/bridge_web_core.d.ts
  • mise.toml
  • release/bridge-cffi-public-exports.txt
💤 Files with no reviewable changes (6)
  • baml_language/sdks/swift/Sources/BamlBridge/Api.swift
  • baml_language/crates/bridge_cffi/tests/abi_layout.c
  • baml_language/crates/bridge_cffi/tests/abi_layout.rs
  • release/bridge-cffi-public-exports.txt
  • baml_language/crates/bridge_cffi/tests/abi_assertions.h
  • baml_language/crates/bridge_cffi/cbindgen.toml

@sxlijin
sxlijin force-pushed the agent/unify-cffi-call-targets branch from 8f27930 to d8f38c9 Compare July 28, 2026 21:20
@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 21:21 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 28, 2026 21:26 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 28, 2026 21:42 Inactive
@sxlijin
sxlijin force-pushed the agent/unify-cffi-call-targets branch from d8f38c9 to eaf39f2 Compare July 28, 2026 22:11
@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 22:13 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 28, 2026 22:20 Inactive

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

🧹 Nitpick comments (2)
baml_language/sdks/python/rust/bridge_python/src/runtime.rs (1)

21-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

decode_args is duplicated verbatim across bridges.

This function (call_id validation, target extraction, FunctionHandle+type_args rejection, type_args/kwargs conversion) is identical to the same-named function in the Java and TypeScript bridge crates. Since all of them already depend on bridge_cffi, this looks like a good candidate to hoist into bridge_cffi as a shared helper to avoid the 3+ copies drifting apart over time.

Also applies to: 104-156, 158-217, 224-250

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/sdks/python/rust/bridge_python/src/runtime.rs` around lines 21
- 30, Move the duplicated decode_args logic, including call_id validation,
target extraction, FunctionHandle/type_args rejection, and type_args/kwargs
conversion, into a shared helper in bridge_cffi. Update the Python, Java, and
TypeScript bridge implementations to call that helper and reuse its shared
decoded-arguments type, removing their local copies while preserving existing
behavior.
baml_language/sdks/go/sdkgen_go/src/lib.rs (1)

2479-2494: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Fragile string-surgery for context injection.

render_returned_callback_go_type derives the returned-callable's Go type by textually splicing context.Context into the already-rendered render_callback_go_type string (replacen("func(", ...) + a follow-up .replace("Context, )", "Context)") to fix up the empty-param case). It's correct for every case currently exercised, but any future change to render_callback_go_type's output shape (e.g. a different prefix, or a nested callback whose own rendering also starts with "func(") could silently break this.

Consider threading a with_leading_context: bool parameter into render_callback_go_type directly instead of post-processing its output string.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/sdks/go/sdkgen_go/src/lib.rs` around lines 2479 - 2494, Update
render_callback_go_type to accept a with_leading_context boolean and render the
context.Context parameter directly when requested. Change
render_returned_callback_go_type to pass this flag and return the rendered
result without replacen or replace string surgery, preserving the existing
parameter behavior for other callers.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@baml_language/crates/bridge_cffi/src/baml_to_host.rs`:
- Around line 368-371: Update the missing-argument branch in the callable
argument handling to return BridgeError::MissingArgument, or an equivalent
invalid-argument variant, instead of BridgeError::Internal so it maps to
baml.errors.InvalidArgument. Add an outbound-envelope test covering a callable
invocation that omits a required argument.

In `@baml_language/sdks/cpp/bridge_cpp/include/baml/detail/loader.h`:
- Around line 302-310: Validate every required ABI function pointer, including
call_function, for null in the C++ loader before materializing or invoking the
table, alongside the existing ABI version and size checks. In
baml_language/sdks/rust/bridge_rust/src/capi.rs:207-224, keep raw ABI slots
nullable during loading and validate all required entries before constructing
Api; update both sites as part of the same validation flow.

In `@baml_language/sdks/go/bridge_go/pkg/proto.go`:
- Around line 27-37: Update encodeCallArgs to require an explicit call target
instead of accepting an optional variadic functionName; always populate
CallFunctionArgs.CallTarget from that required argument. Find and update every
encodeCallArgs caller to pass the appropriate target, ensuring no caller can
construct a payload without dispatch information.

---

Nitpick comments:
In `@baml_language/sdks/go/sdkgen_go/src/lib.rs`:
- Around line 2479-2494: Update render_callback_go_type to accept a
with_leading_context boolean and render the context.Context parameter directly
when requested. Change render_returned_callback_go_type to pass this flag and
return the rendered result without replacen or replace string surgery,
preserving the existing parameter behavior for other callers.

In `@baml_language/sdks/python/rust/bridge_python/src/runtime.rs`:
- Around line 21-30: Move the duplicated decode_args logic, including call_id
validation, target extraction, FunctionHandle/type_args rejection, and
type_args/kwargs conversion, into a shared helper in bridge_cffi. Update the
Python, Java, and TypeScript bridge implementations to call that helper and
reuse its shared decoded-arguments type, removing their local copies while
preserving existing behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3e2ce807-f68d-4718-ba70-1c7d4bc2d1a7

📥 Commits

Reviewing files that changed from the base of the PR and between 8f27930 and eaf39f2.

⛔ Files ignored due to path filters (15)
  • baml_language/sdks/go/baml_go/internal/cffi/baml_inbound.pb.go is excluded by !**/*.pb.go
  • baml_language/sdks/go/bridge_go/cffi/proto/baml_bridge/cffi/v1/baml_inbound.pb.go is excluded by !**/*.pb.go
  • baml_language/sdks/typescript/bridge_typescript/dist/define_function.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/define_function.js.map is excluded by !**/dist/**, !**/*.map
  • baml_language/sdks/typescript/bridge_typescript/dist/index.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/index.js.map is excluded by !**/dist/**, !**/*.map
  • baml_language/sdks/typescript/bridge_typescript/dist/native.d.ts is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/proto.d.ts is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/proto.d.ts.map is excluded by !**/dist/**, !**/*.map
  • baml_language/sdks/typescript/bridge_typescript/dist/proto.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/proto.js.map is excluded by !**/dist/**, !**/*.map
  • baml_language/sdks/typescript/bridge_typescript/dist/proto/baml_cffi.d.ts is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/proto/baml_cffi.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/stream.js is excluded by !**/dist/**
  • baml_language/sdks/typescript/bridge_typescript/dist/stream.js.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (88)
  • baml_language/crates/bex_engine/src/lib.rs
  • baml_language/crates/bex_engine/tests/host_value_callable.rs
  • baml_language/crates/bex_project/src/bex.rs
  • baml_language/crates/bex_project/src/lib.rs
  • baml_language/crates/bridge_cffi/cbindgen.toml
  • baml_language/crates/bridge_cffi/include/baml_cffi.h
  • baml_language/crates/bridge_cffi/src/api.rs
  • baml_language/crates/bridge_cffi/src/baml_to_host.rs
  • baml_language/crates/bridge_cffi/src/error.rs
  • baml_language/crates/bridge_cffi/src/lib_native.rs
  • baml_language/crates/bridge_cffi/src/lib_wasm.rs
  • baml_language/crates/bridge_cffi/tests/abi_assertions.h
  • baml_language/crates/bridge_cffi/tests/abi_layout.c
  • baml_language/crates/bridge_cffi/tests/abi_layout.rs
  • baml_language/crates/bridge_ctypes/types/baml_bridge/cffi/v1/baml_inbound.proto
  • baml_language/sdk_tests/crates/csharp/phase11_host_callable/Program.cs
  • baml_language/sdk_tests/crates/go/function_calls/customizable/test_host_callables_test.go
  • baml_language/sdk_tests/fixtures/function_calls/baml_src/ns_host_callable_tests/main.baml
  • baml_language/sdks/cpp/bridge_cpp/include/baml/detail/call.h
  • baml_language/sdks/cpp/bridge_cpp/include/baml/detail/loader.h
  • baml_language/sdks/cpp/bridge_cpp/include/baml/detail/proto.h
  • baml_language/sdks/cpp/bridge_cpp/pb/baml_bridge/cffi/v1/baml_inbound.pb.cc
  • baml_language/sdks/cpp/bridge_cpp/pb/baml_bridge/cffi/v1/baml_inbound.pb.h
  • baml_language/sdks/cpp/sdkgen_cpp/src/lib.rs
  • baml_language/sdks/csharp/ABI.md
  • baml_language/sdks/csharp/bridge_csharp/src/Cffi/EncodedCallArguments.cs
  • baml_language/sdks/csharp/bridge_csharp/src/Cffi/NativeApi.cs
  • baml_language/sdks/csharp/bridge_csharp/src/Cffi/NativeTypes.cs
  • baml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.AbiLifetimeProbe/Program.cs
  • baml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.AbiProbe/Program.cs
  • baml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.HostCallable.Tests/Program.cs
  • baml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.ProgramBootstrapProbe/NativeBytecodeInitializer.cs
  • baml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.StreamMediaAbiProbe/NativeBridge.cs
  • baml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.Tests/Program.cs
  • baml_language/sdks/csharp/sdkgen_csharp/src/semantic.rs
  • baml_language/sdks/go/baml_go/function.go
  • baml_language/sdks/go/baml_go/internal/cffi/include/baml_cffi.h
  • baml_language/sdks/go/baml_go/native_darwin_test.go
  • baml_language/sdks/go/baml_go/native_unix.go
  • baml_language/sdks/go/baml_go/native_unsupported.go
  • baml_language/sdks/go/baml_go/native_windows.go
  • baml_language/sdks/go/baml_go/runtime.go
  • baml_language/sdks/go/bridge_go/cffi/bridge.h
  • baml_language/sdks/go/bridge_go/cffi/lib.go
  • baml_language/sdks/go/bridge_go/pkg/proto.go
  • baml_language/sdks/go/bridge_go/pkg/runtime.go
  • baml_language/sdks/go/sdkgen_go/src/lib.rs
  • baml_language/sdks/java/baml_bridge/src/main/java/baml_bridge/BamlFfi.java
  • baml_language/sdks/java/baml_bridge/src/main/java/baml_bridge/internal/ProtoWriter.java
  • baml_language/sdks/java/bridge_java/src/lib.rs
  • baml_language/sdks/java/sdkgen_java/src/emit.rs
  • baml_language/sdks/java/sdkgen_java/src/lib.rs
  • baml_language/sdks/python/rust/bridge_python/src/baml_core/baml_py/__init__.pyi
  • baml_language/sdks/python/rust/bridge_python/src/py_handle.rs
  • baml_language/sdks/python/rust/bridge_python/src/runtime.rs
  • baml_language/sdks/python/src/baml_bridge/__init__.py
  • baml_language/sdks/python/src/baml_bridge/_stream.py
  • baml_language/sdks/python/src/baml_bridge/baml_py.pyi
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_inbound_pb2.py
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_inbound_pb2.pyi
  • baml_language/sdks/python/src/baml_bridge/proto.py
  • baml_language/sdks/rust/bridge_rust/src/capi.rs
  • baml_language/sdks/rust/bridge_rust/src/function.rs
  • baml_language/sdks/rust/bridge_rust/src/runtime.rs
  • baml_language/sdks/rust/bridge_rust/src/wire/baml_bridge.cffi.v1.rs
  • baml_language/sdks/rust/sdkgen_rust/src/translate_ty.rs
  • baml_language/sdks/swift/Sources/BamlBridge/Api.swift
  • baml_language/sdks/swift/Sources/BamlBridge/Encode.swift
  • baml_language/sdks/swift/Sources/BamlBridge/Proto/.generated-from
  • baml_language/sdks/swift/Sources/BamlBridge/Proto/baml_inbound.pb.swift
  • baml_language/sdks/swift/Sources/BamlBridge/Runtime.swift
  • baml_language/sdks/swift/Sources/CBamlBridge/include/baml_cffi.h
  • baml_language/sdks/typescript/bridge_typescript/src/errors.rs
  • baml_language/sdks/typescript/bridge_typescript/src/runtime.rs
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/define_function.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/index.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/native.d.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/proto.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/proto/baml_cffi.d.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/proto/baml_cffi.js
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/stream.ts
  • baml_language/sdks/typescript/bridge_typescript_web/src/errors.rs
  • baml_language/sdks/typescript/bridge_typescript_web/src/runtime.rs
  • baml_language/sdks/typescript/bridge_typescript_web/typescript_src/index.ts
  • baml_language/sdks/typescript/bridge_typescript_web/typescript_src/native.ts
  • baml_language/sdks/typescript/bridge_typescript_web/typescript_src/wasm/bridge_web_core.d.ts
  • mise.toml
  • release/bridge-cffi-public-exports.txt
💤 Files with no reviewable changes (6)
  • baml_language/sdks/swift/Sources/BamlBridge/Api.swift
  • baml_language/crates/bridge_cffi/tests/abi_layout.c
  • release/bridge-cffi-public-exports.txt
  • baml_language/crates/bridge_cffi/tests/abi_layout.rs
  • baml_language/crates/bridge_cffi/tests/abi_assertions.h
  • baml_language/crates/bridge_cffi/cbindgen.toml
🚧 Files skipped from review as they are similar to previous changes (46)
  • baml_language/sdks/swift/Sources/BamlBridge/Proto/.generated-from
  • baml_language/sdks/swift/Sources/BamlBridge/Encode.swift
  • baml_language/sdks/typescript/bridge_typescript_web/src/errors.rs
  • baml_language/crates/bridge_cffi/src/error.rs
  • baml_language/sdks/cpp/bridge_cpp/include/baml/detail/call.h
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/proto/baml_cffi.d.ts
  • baml_language/sdks/go/baml_go/native_unsupported.go
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/native.d.ts
  • baml_language/sdks/go/bridge_go/pkg/runtime.go
  • baml_language/sdks/python/rust/bridge_python/src/py_handle.rs
  • baml_language/sdks/csharp/bridge_csharp/src/Cffi/EncodedCallArguments.cs
  • baml_language/sdks/go/bridge_go/cffi/lib.go
  • baml_language/sdks/go/bridge_go/cffi/bridge.h
  • baml_language/sdks/typescript/bridge_typescript_web/typescript_src/index.ts
  • baml_language/sdks/python/src/baml_bridge/proto.py
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/stream.ts
  • baml_language/sdks/typescript/bridge_typescript/src/errors.rs
  • baml_language/sdks/cpp/bridge_cpp/include/baml/detail/proto.h
  • baml_language/sdks/rust/bridge_rust/src/wire/baml_bridge.cffi.v1.rs
  • baml_language/sdks/swift/Sources/BamlBridge/Runtime.swift
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/define_function.ts
  • baml_language/sdks/python/src/baml_bridge/_stream.py
  • baml_language/sdks/python/rust/bridge_python/src/baml_core/baml_py/init.pyi
  • baml_language/sdks/python/src/baml_bridge/cffi/v1/baml_inbound_pb2.py
  • baml_language/sdks/typescript/bridge_typescript_web/typescript_src/wasm/bridge_web_core.d.ts
  • baml_language/sdks/go/baml_go/native_windows.go
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/index.ts
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/proto.ts
  • baml_language/sdks/typescript/bridge_typescript_web/typescript_src/native.ts
  • baml_language/sdks/java/baml_bridge/src/main/java/baml_bridge/BamlFfi.java
  • baml_language/sdks/python/src/baml_bridge/baml_py.pyi
  • baml_language/sdks/go/baml_go/runtime.go
  • baml_language/sdks/typescript/bridge_typescript/typescript_src/proto/baml_cffi.js
  • baml_language/sdks/cpp/bridge_cpp/pb/baml_bridge/cffi/v1/baml_inbound.pb.h
  • baml_language/sdks/java/baml_bridge/src/main/java/baml_bridge/internal/ProtoWriter.java
  • baml_language/sdks/csharp/bridge_csharp/src/Cffi/NativeApi.cs
  • baml_language/crates/bridge_cffi/src/api.rs
  • baml_language/sdks/csharp/bridge_csharp/src/Cffi/NativeTypes.cs
  • baml_language/sdks/swift/Sources/BamlBridge/Proto/baml_inbound.pb.swift
  • baml_language/sdks/go/baml_go/internal/cffi/include/baml_cffi.h
  • baml_language/sdks/python/src/baml_bridge/init.py
  • baml_language/sdks/rust/bridge_rust/src/runtime.rs
  • baml_language/sdks/cpp/bridge_cpp/pb/baml_bridge/cffi/v1/baml_inbound.pb.cc
  • baml_language/sdks/typescript/bridge_typescript/src/runtime.rs
  • baml_language/sdks/java/bridge_java/src/lib.rs
  • baml_language/crates/bridge_cffi/src/lib_native.rs

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 28, 2026 22:33 Inactive
@sxlijin
sxlijin force-pushed the agent/unify-cffi-call-targets branch from eaf39f2 to 59e70da Compare July 28, 2026 22:42
@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 22:44 Inactive
@sxlijin
sxlijin force-pushed the agent/unify-cffi-call-targets branch from 59e70da to 24228e3 Compare July 28, 2026 22:50
@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 22:51 Inactive
@sxlijin
sxlijin force-pushed the agent/unify-cffi-call-targets branch from 24228e3 to 5797bd1 Compare July 28, 2026 22:56
@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 22:57 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 28, 2026 23:04 Inactive
@sxlijin
sxlijin added this pull request to the merge queue Jul 28, 2026
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 28, 2026 23:17 Inactive
Merged via the queue into canary with commit c8a6d7c Jul 28, 2026
85 checks passed
@sxlijin
sxlijin deleted the agent/unify-cffi-call-targets branch July 28, 2026 23:23

This branch was previously deployed

3 inactive deployments
Preview – promptfiddle — 5797bd16 Deployed Jul 28, 2026 by vercel[bot]
Preview – promptfiddle2 — 5797bd16 Deployed Jul 28, 2026 by vercel[bot]
Preview – beps — 5797bd16 Deployed Jul 28, 2026 by vercel[bot]
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.

1 participant