* libwaku: Avoid global variable and changing callback signature
* Better signature for the callback. Two new parameters have been added:
one aimed to allow passing the caller result code; the other
param is to pass an optional userData pointer that might need
to be linked locally with the Context object. For example, this is needed
in Rust to make the passed closures live as
long as the Context.
* waku_example.c: adaptation to the latest changes
* libwaku.h: removing 'waku_set_user_data' function
* libwaku.nim: renaming parameter in WakuCallBack (isOk -> callerRet)
* libwaku.nim: unsubscribe -> unsubscribeAll to make it build properly
We introduced a change in the next PR
https://github.com/waku-org/nwaku/pull/1983/
that made the `libwaku` to stop building properly
(make libwaku) because a signature change in the
`unsubscribe` proc of waku/waku_relay/protocol.nim.
This commit is a temporary workaround to make it work,
and not block any ongoing PR tests,
although not exactly as it is expected because we are
unsubscribing from all topics.
* ci.yml: adds library/** to force tests when changes under that folder
* Thread-safe comms between main thread & Waku Thread - ChannelSPSCSingle.
* Renaming procs from 'new' to 'createShared'. They use the shared allocator.
* peer_manager_request: no need to use ptr WakuNode.
* waku_thread: moving the 'waitFor' to upper layer.
* waku_thread: `poll()` -> `waitFor sleepAsync(1)` to avoid risk of blocking.
* libwaku: thread-safe "sub-objects" in an inter-thread requests.
When two threads send data each other, that data cannot contain any
GC'ed type (string, seq, ref, closures) at any level.
* Allocating the 'configJson' in main thread and deallocating in Waku Thread.
* libwaku: create the WakuNode in the Waku thread. Not in the main thread
* node_lifecycle_request.nim: moving hard-coded value to a const item
* libwaku.nim: start using 'isOkOr' instead of 'isErr()'-approach
* node_lifecycle_request.nim: better 'async' & 'await' usage. Not block the runtime