refactor(codegen): C++ header names follow native=bare / cbor=_cbor#65
Draft
Ivansete-status wants to merge 1 commit into
Draft
refactor(codegen): C++ header names follow native=bare / cbor=_cbor#65Ivansete-status wants to merge 1 commit into
Ivansete-status wants to merge 1 commit into
Conversation
…nvention Aligns the C++ generators with the C generator and the symbol naming: the native (zero-serialization, same-process) wrapper is the bare `<lib>.hpp` and the CBOR (inter-process) wrapper carries the `_cbor` suffix — mirroring the C headers (`<lib>.h` / `<lib>_cbor.h`) and the `<name>` / `<name>_cbor` exports. Previously native was `<lib>_native.hpp` and CBOR was the bare `<lib>.hpp`, which is backwards from the symbol convention and would collide on the native `<lib>.h` when both ABIs emit into one dir (ffiMode=both). With the flip, a single `genbindings_cpp` run now drops `<lib>.hpp` + `<lib>_cbor.hpp` side by side, exactly like c_bindings holds both `.h` headers. Consumers updated to match: the CBOR cpp_bindings driver and the C++ e2e suite include `*_cbor.hpp`; the native example includes the bare `<lib>.hpp`. Validated: native example runs on `my_timer.hpp`; C++ e2e suite 19/19 on the `_cbor.hpp` headers; check_bindings_cpp regen is deterministic. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Reconciles the C++ header filenames with the C generator and the symbol naming. Native (zero-serialization, same-process) is the bare
<lib>.hpp; CBOR (inter-process) carries the_cborsuffix — matching the C headers (<lib>.h/<lib>_cbor.h) and the<name>/<name>_cborexports.Previously native was
<lib>_native.hppand CBOR was the bare<lib>.hpp— backwards from the convention, and a collision risk on the native<lib>.hwhen both ABIs emit into one dir. With the flip, a singlegenbindings_cpprun drops<lib>.hpp(native) +<lib>_cbor.hpp(CBOR) side by side, exactly likec_bindingsholds both.hheaders.Consumers updated: the CBOR cpp example driver and the C++ e2e suite include
*_cbor.hpp; the native example includes the bare<lib>.hpp.Test
my_timer.hpp._cbor.hppheaders.check_bindings_cppregen is deterministic.Stacked on #63.
🤖 Generated with Claude Code