Ivan FB b7fa33f2c7
feat(codegen): native Swift generator over the C ABI
Adds ffi/codegen/swift.nim, wired into the targetLang dispatch and exposed
as the `genbindings_swift` nimble task. It emits an idiomatic Swift wrapper
over the native (zero-serialization) C ABI from c.nim — importing the C
structs through the CMyTimer clang module and never touching CBOR.

The one piece of real logic is callback-shape selection: ack / string /
struct decoding is chosen per proc from FFIProcMeta.kind + returnTypeName,
and struct returns are copied out inside the callback to honour the
deep-free-after-callback ownership rule. A single struct param's fields are
flattened into the Swift method signature; ctors keep argument labels.

Procs needing seq/Option or multi-struct param marshaling are skipped with a
logged notice rather than emitting broken Swift, so the wrapper always
compiles. That marshaling, events, and async mapping are the next increments.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 16:39:54 +02:00
..
2026-05-25 15:51:56 +02:00
2026-05-27 22:26:39 +02:00
2026-05-27 22:26:39 +02:00
2026-05-16 01:08:42 +02:00
2026-05-08 14:14:16 -03:00