Ivan FB e36fe62033
feat(codegen): native Kotlin/JNI generator over the C ABI
Adds ffi/codegen/kotlin.nim, wired into the targetLang dispatch and exposed
as the `genbindings_kotlin` nimble task. From the same metadata it emits both
artifacts an Android consumer needs over the native (zero-serialization) C
ABI from c.nim: an idiomatic Kotlin AutoCloseable wrapper and the JNI shim
that bridges it.

Callback-shape selection is per proc (ack / string / struct), and the JNI
shim blocks on a condvar until the FFI-thread callback fires so the Kotlin
side stays synchronous. An all-string struct return crosses as a String[]
that the wrapper repacks into a data class — matching the validated example.

Procs needing seq/Option params, multiple struct params, or a non-string
struct return are skipped with a logged notice so the generated code always
compiles. That marshaling, events, and async are the next increments.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 16:54:31 +02:00
2026-05-19 12:43:34 +02:00
2026-05-21 16:33:38 +02:00
2026-05-20 14:14:42 -03:00
2026-05-27 22:26:39 +02:00
2026-05-20 14:14:42 -03:00
2026-05-16 01:08:42 +02:00
2026-05-20 14:14:42 -03:00
2026-05-20 14:14:42 -03:00

nim-ffi

Allows exposing Nim projects to other languages

Example

examples/timer is now a self-contained Nimble project that imports nim-ffi directly. Use cd examples/timer && nimble install -y ../.. && nimble build to compile the example.

Description
Allows exposing Nim projects to other languages
Readme
Languages
Nim 87.9%
Smarty 5.9%
C++ 4.8%
CMake 1.4%