mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-02 05:53:11 +00:00
* deep changes in libwaku to adap to nim-ffi * start using ffi pragma in library * update some binding examples * add missing declare_lib.nim file * properly rename api files in library folder
11 lines
270 B
Nim
11 lines
270 B
Nim
import ffi
|
|
import waku/factory/waku
|
|
|
|
declareLibrary("waku")
|
|
|
|
proc set_event_callback(
|
|
ctx: ptr FFIContext[Waku], callback: FFICallBack, userData: pointer
|
|
) {.dynlib, exportc, cdecl.} =
|
|
ctx[].eventCallback = cast[pointer](callback)
|
|
ctx[].eventUserData = userData
|