30 Commits

Author SHA1 Message Date
Ivan FB
e3dd6203ae
Start using nim-ffi to implement libwaku (#3656)
* 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
2025-12-19 17:00:43 +01:00
Ivan FB
d7a3a85db9 chore: Libwaku watchdog that can potentially raise a WakuNotResponding event if Waku is blocked (#3466)
* refactor add waku not responding event to libwaku

Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
2025-06-24 23:20:08 +02:00
Ivan FB
25a3f4192c feat: retrieve metrics from libwaku (#3452) 2025-06-12 12:49:05 +02:00
gabrielmer
daa4a6a986 feat: add waku_disconnect_all_peers to libwaku (#3438) 2025-06-05 17:25:14 +02:00
gabrielmer
94cd2f88b4 chore: exposing online state in libwaku (#3433) 2025-05-30 17:47:06 +02:00
gabrielmer
93698a0a88 feat: add waku_get_connected_peers_info to libwaku (#3356) 2025-04-04 11:52:33 +03:00
gabrielmer
6d3c758540 feat: waku_relay_get_peers_in_mesh to libwaku (#3352) 2025-04-03 15:13:10 +03:00
gabrielmer
8b443edd98 feat: add waku_relay_get_connected_peers to libwaku (#3353) 2025-04-03 14:27:27 +03:00
richΛrd
ba1870d114 feat(libwaku): add protected topic (#3211) 2025-01-07 09:29:39 -04:00
richΛrd
9dc1b88b18 refactor(libwaku): async (#3180) 2024-12-02 10:56:12 -04:00
Ivan FB
439a3ae394 chore: Filter in libwaku (#3177) 2024-11-29 15:31:08 +01:00
gabrielmer
d225c6e1e2 feat: adding waku_dial_peer and get_connected_peers to libwaku (#3149) 2024-10-30 16:26:33 +02:00
richΛrd
2ffca2078b feat(libwaku): ping peer (#3144) 2024-10-24 09:07:08 -04:00
gabrielmer
7e5546cfff chore: add to libwaku peer id retrieval proc (#3124) 2024-10-17 19:13:00 +03:00
gabrielmer
e3de3e9210 chore: adding to libwaku dial and disconnect by peerIds (#3111) 2024-10-15 15:32:02 +03:00
Ivan FB
004b56e422 chore: libwaku - extending the library with peer_manager and peer_exchange features (#3026)
* libwaku: get peerids by protocol and peer exchange request
2024-09-11 10:13:54 +02:00
Ivan FB
6eff20507a libwaku: exposing more features (#3003)
- Allow to start or store discv5
- Expose lightpush request operation
- Expose list of connected and mesh peers
- Expose store client
2024-08-29 14:29:02 +02:00
Ivan FB
ebea143031 chore: libwaku retrieve my enr and adapt golang example (#2987) 2024-08-22 12:01:14 +02:00
richΛrd
a638ae0598 chore: android support (#2554) 2024-05-21 21:00:22 -04:00
Ivan FB
4407ea021f chore: Discovery in libwaku (#2711)
* cwaku_example: add discoveryv5-discovery bool option
* libwaku: implement discovery capabilities
* node_lifecycle_request.nim: better control of possible errors when parsing config
2024-05-21 18:37:50 +02:00
richΛrd
eb80891c1e feat(c-bindings): add function to dealloc nodes (#2499) 2024-03-07 13:53:03 -04:00
Ivan FB
6769d25f54 chore: bindings return multiaddress array (#2461)
* waku_example.c: adapt signature to new parameter 'void* userData'
* libwaku: add new DEBUG request handler to retrieve the list of listened multiaddresses
* waku_example.c: use example the new 'waku_listen_addresses'
* add debug_node_request.nim file
2024-02-21 12:06:05 +01:00
richΛrd
1ac6fb63e2 feat: eventCallback per wakunode and userData (#2418)
* feat: store event callback in `Context`
* feat: add userData to callbacks
2024-02-13 10:22:22 -04:00
richΛrd
66bc31cede chore: add stdef.h to libwaku.h (#2409) 2024-02-13 10:21:31 -04:00
Ivan FB
d7e8477b3f libwaku: avoid using waku_init. Only use waku_new to create node and context (#2282) 2023-12-15 13:32:12 +01:00
Ivan FB
b93ea38e64 chore(cbindings): avoid using global var in libwaku.nim (#2118)
* 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)
2023-10-23 08:37:28 +02:00
Ivan Folgueira Bande
fe8a9ec59d chore(cbindings): Adding cpp example that integrates the 'libwaku' (#2079)
* Adding cpp example that integrates the `libwaku`

---------

Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
2023-09-28 11:10:42 +02:00
Ivan Folgueira Bande
69969762a7 Adding example on how to integrate a Waku node in NodeJs (#1751) 2023-08-02 10:45:15 +02:00
Ivan Folgueira Bande
bceaaa650d refactor(cbindings): libwaku - run waku node in a secondary working thread (#1865)
* Refactoring to have a working waku_thread
2023-07-31 09:52:04 +02:00
Ivan Folgueira Bande
44716dfe23 Refactoring of libwaku to export only C types (#1845)
* Simplifying libwaku.nim by extracting config parser to config.nim
* Adding json_base_event.nim
* Starting to control-version the libwaku.h

  We are creating this libwaku.h inspired by the one that is automatically
  generated by the nim compiler when `make libwaku` is invoked. Therefore,
  the self-generated header is then placed in:

  nimcache/release/libwaku/libwaku.h

* Better waku_example.c organization
* libwaku.nim: better memory management

  We need to create a 'cstring' internally from the 'const char*' passed
  from outside the library.

  We invoke 'allocShared' in order to create the internal 'cstring',
  and invoke 'deallocShared' in order to manually free the memory.
2023-07-07 10:53:00 +02:00