Ivan FB 1c99eaa189
fix(pool): park context on destroy to keep fd reuse active
The reuse branch in createFFIContext only fires for a parked slot, and a
slot is only parked by releaseFFIContext. The generated destructor was
still calling destroyFFIContext (full teardown, marks the slot
uninitialised), so the reuse path never triggered and the fd-leak fix was
inert in the generated API.

Switch ffiDtor to releaseFFIContext so the worker and its fds survive the
destroy and get reused on the next create. This is safe because the
framework handles one request at a time: by the time the destructor runs
the worker is idle, not mid-request, so parking cannot race a handler.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 14:53:36 +02:00
2026-05-11 19:21:40 -03:00
2026-06-02 23:07:06 +02:00
2026-06-02 22:53:47 +02:00

nim-ffi

Allows exposing Nim projects to other languages

Example

examples/nim_timer is now a self-contained Nimble project that imports nim-ffi directly. Use cd examples/nim_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%