Aligns the Rust crate names with the C generator and the symbol naming: the
native (zero-serialization, same-process) crate is the bare `<lib>` and the
CBOR (inter-process) crate carries the `_cbor` suffix — mirroring `<lib>.h` /
`<lib>_cbor.h` and the `<name>` / `<name>_cbor` exports.
Previously the native crate was `<lib>_native` and the CBOR crate was the bare
`<lib>`, which is backwards from the symbol convention. Only the Cargo package
name changes; the linked dylib stays `lib<lib>.dylib` (the `#[link]` name and
build.rs are untouched).
Consumers updated: rust_client depends on `my_timer_cbor` and imports from it;
the native demo imports from the bare `my_timer`.
Validated: rust_client builds against the renamed CBOR crate; the native demo
round-trips version / echo / event / complex / schedule against the bare crate;
check_bindings_rust regen is deterministic.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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>
The Rust wrapper speaks CBOR, but after the native/CBOR split it still declared
and called the bare `<name>` request symbols — which are now the *native*
(typed-args) entry points, so every Rust request hit the wrong ABI (struct/ptr
mismatch). This is the Rust counterpart of the C++ fix (914c70a), which was
missed at the time. Point the ffi.rs externs and the api.rs ctor/method calls at
`<name>_cbor`; the destructor has no CBOR variant and the event registration is
unchanged here.
Verified at runtime: the rust_client now creates a context and round-trips
version / echo / schedule over CBOR.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>