mirror of
https://github.com/logos-messaging/nim-ffi.git
synced 2026-06-22 09:20:13 +00:00
Extends the native C++ marshalling to sequences and optionals: a C++ field maps to std::vector<T> / std::optional<T>, and `toC` returns a holder that owns the C-array backing (move/NRVO-safe std::vectors) while string pointers borrow the C++ argument — valid for the call, which the library deep-copies. `fromC` reads seq/Option back out of the C-POD. Unblocks the timer's complex (seq-of-structs / seq-of-strings / two optionals) and schedule (three struct params) methods — they now generate and round-trip typed results. Verified end-to-end and ASAN-clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>