11 Commits

Author SHA1 Message Date
Ivan FB
918dd72390
feat(ffi): native event delivery + dual-ABI event symbol naming
Events now mirror the native/CBOR split already in place for requests, with the
same symbol-naming convention:

- `<lib>_add_event_listener`      -> NATIVE listener (typed `<T>Pod` by pointer)
- `<lib>_add_event_listener_cbor` -> CBOR listener (EventEnvelope bytes)

Framework: `FFIEventListener` gains a `native` flag; `addEventListener` a
`native` param; a new `dispatchFFIEventDual` template builds the `<T>Pod` once
for native listeners (`nimToPod`/`freePod`) and the CBOR envelope once for the
rest, fanning each out — so a single `{.ffiEvent.}` dispatch serves both kinds.
`declareLibrary` exports both registration entry points.

Generators: the bare `<lib>_add_event_listener` is the native symbol; every
CBOR consumer (C/C++/Go/Rust) now targets `<lib>_add_event_listener_cbor`. The
rename and the generator updates ship together so the bare name is never briefly
broken. Bindings regenerated.

Validated: native-event unit test (typed POD to native + CBOR to cbor listener,
orc/refc/ASAN); full unit suite; C++ e2e 19/19; Go example; existing event
tests unchanged. The per-event *typed* native callback + wildcard router (the
ergonomic consumer surface) is a follow-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 18:37:27 +02:00
Ivan FB
914c70a131
fix(codegen): C++ bindings target the *_cbor exports
The C++ wrapper speaks CBOR, but after the native/CBOR split it still called the
bare `<name>` symbols — which are now the *native* (typed-args) entry points, so
every C++ call hit the wrong ABI and the C++ e2e failed 19/19 (also reddening
the ASan/TSan jobs, which run the same suite). Point the generated extern
declarations and call sites at `<name>_cbor` for `{.ffi.}` procs and the ctor;
the destructor has no CBOR variant and stays bare. Regenerated the timer and
echo C++ bindings. C++ e2e back to 19/19.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 16:31:12 +02:00
Gabriel Cruz
7ccf34591d
chore: avoid throwing exceptions in C++ bindings (#46) 2026-05-29 12:35:49 -03:00
Ivan FB
e394166c46
Cpp typed event listeners (#51) 2026-05-28 22:40:33 +02:00
Ivan FB
3f19411684
Event listener abi (#50) 2026-05-28 16:00:28 +02:00
Gabriel Cruz
436c0d760b
test(cpp-e2e): add multi-context, cross-library, pipeline, stress tests (#30) (#42) 2026-05-26 09:18:12 -03:00
Ivan FB
6a7e4616fd
Adjust events to cbor (#39) 2026-05-25 15:51:56 +02:00
Gabriel Cruz
31d0ebfa51
chore(ci): extend cpp-e2e to OS matrix (#38) 2026-05-22 11:43:37 -03:00
Ivan FB
c7cf46bdea
avoid move ctor and assing operator in cpp generated code (#36) 2026-05-21 16:38:13 +02:00
Ivan FB
584e818ac9
Add basic cpp e2e tests (#27) 2026-05-19 12:43:34 +02:00
Ivan FB
ac303a707e
Start using CBOR (#23)
Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
Co-authored-by: Gabriel Cruz <8129788+gmelodie@users.noreply.github.com>
2026-05-16 01:08:42 +02:00