nim-chat-poc/library/declare_lib.nim
osmaczko 1d727c1fcf
chore: add smoke test and redesign CI workflow (#62)
Add a smoke test that validates the binary links all dependencies
at runtime by instantiating a client without networking. Redesign
CI into separate build and test jobs, with test gated on build.
2026-02-13 20:44:50 +01:00

14 lines
288 B
Nim

import ffi
import src/chat/client
declareLibrary("logoschat")
proc set_event_callback(
ctx: ptr FFIContext[ChatClient],
callback: FFICallBack,
userData: pointer
) {.dynlib, exportc, cdecl.} =
ctx[].eventCallback = cast[pointer](callback)
ctx[].eventUserData = userData