Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: C bindings for Waku Relay #1632

Closed
6 tasks done
Ivansete-status opened this issue Mar 30, 2023 · 0 comments · Fixed by #1751
Closed
6 tasks done

feat: C bindings for Waku Relay #1632

Ivansete-status opened this issue Mar 30, 2023 · 0 comments · Fixed by #1751
Assignees

Comments

@Ivansete-status
Copy link
Collaborator

Ivansete-status commented Mar 30, 2023

Problem

nwaku can't be easily exported to other environments, such as NodeJS or Rust.

Suggested solution

Have nwaku C bindings so that a NodeJS user can easily start a Waku node in Relay mode.

Additional context

This is a first step of having a full operative Waku node in other platforms. For now we focus on the Waku Relay protocol.
We want to tackle the nwaku C-bindings option of: "use nwaku with NodeJS" - #1332
The final goal that we chase: "C-bindings for Kotlin, Rust, etc" - #904

Acceptance criteria

  • Have dynamic library (waku.so) for unix systems.
  • Have a static library (waku.a) for unix systems.
  • Have a C program that links nwaku libraries. That program should operate as a Relay node, allowing:
    • subscribe/unsubscribe from a PubSub topic.
    • send a message to a PubSub topic.
  • Have a npm package so that a "Waku Relay" node can be started from NodeJS.
  • Waku relay example in Python.
  • Waku relay example in Golang.
@jm-clius jm-clius moved this to To Do in Waku Apr 4, 2023
@Ivansete-status Ivansete-status self-assigned this Apr 4, 2023
@jm-clius jm-clius moved this from To Do to In Progress in Waku May 2, 2023
Ivansete-status added a commit that referenced this issue May 12, 2023
* feat(cbindings): first commit - waku relay (#1632)

* test_app.nim: fix compilation issue. App.init(..) -> App.new(..)

* Simplifying library name (libwaku) and standardizing function names (waku_*)

* Proper wrapper of the waku_node API and creation of the libwaku.a

* Rolling back changes that are not needed

* Rolling back changes that are out of the scope of this task

* wakunode.nim: Removing unnecessary import

* Aplying PR suggestions

* Renaming 'waku.h' -> 'libwaku.h'

* Use of 'isNil' instead of '== nil'

* libwaku.nim: explicitly setting waku_poll() as gcsafe
@jm-clius jm-clius moved this from In Progress to Priority in Waku May 23, 2023
@jm-clius jm-clius moved this from Priority to In Progress in Waku Jun 6, 2023
@jm-clius jm-clius moved this from In Progress to Priority in Waku Jul 4, 2023
@Ivansete-status Ivansete-status moved this from Priority to In Progress in Waku Jul 25, 2023
@Ivansete-status Ivansete-status moved this from In Progress to Done in Waku Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants