Repository navigation
feat(cffi): publish generated V1 C ABI - #4055
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
⏭️ Performance benchmarks were skippedPerf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to To run them on this PR, do any of the following, then push a commit (or re-run CI):
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe bridge CFFI surface now has a generated versioned C/C++ ABI header, explicit Rust callback and function-pointer types, cross-language layout assertions, deterministic header checks, and dynamic smoke tests that resolve ChangesCFFI ABI contract and validation
Windows test profile
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant SmokeRunner
participant CConsumer
participant CppConsumer
participant BridgeLibrary
SmokeRunner->>CConsumer: compile and execute public-header consumer
SmokeRunner->>CppConsumer: compile and execute public-header consumer
CConsumer->>BridgeLibrary: resolve baml_get_api_v1
CppConsumer->>BridgeLibrary: resolve baml_get_api_v1
BridgeLibrary-->>CConsumer: return compatible BamlApiV1
BridgeLibrary-->>CppConsumer: return compatible BamlApiV1
CConsumer->>BridgeLibrary: call version and free buffer
CppConsumer->>BridgeLibrary: call version and free buffer
SmokeRunner-->>SmokeRunner: compare observed versions with expected version
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Binary size checks passed✅ 7 passed
Generated by |
Changes
crates/bridge_cffi/include/baml_cffi.has the canonical C/C++ contract forbaml_get_api_v1baml_get_api_v1, validate the table, callversion, and release its bufferTesting
cargo fmt --all --checkcargo test -p bridge_cfficargo clippy -p bridge_cffi --all-targets -- -D warningscargo check -p bridge_cffi --target wasm32-unknown-unknownlibbridge_cffi.dylibSummary by CodeRabbit