Skip to content

[Deliverable] Create nim-ffi #332

@chair28980

Description

@chair28980

Owner: nwaku

Feature: Nim FFI

FURPS:

  • F1. Provides the core logic needed to expose any synchronous or asynchronous Nim library to a C-FFI library.

  • U1. Introduce new pragma definitions, such as {.ffi.}, to appropriately annotate types and procedures.

  • U2. Any Nim project can use it and can be installed using Nimble,
    similarly to how nim-chronos is imported.

  • U3. The interaction with the exposed C library can be done using JSON.

  • U4. The interaction with the exposed C library can be done using protobuf.

  • R1. Nim-FFI does not leak memory.

  • R2. The exposed C library never hangs when working asynchronously.

  • S1. The exposed C library can be used in Golang.

  • S2. The exposed C library can be used in Rust.

  • S3. The exposed C library can be used in Python.

  • +1. nwaku repository uses nim-ffi to expose the existing libwaku functionality.

Checklist:

  • Specs: link to specs and/or API definition
  • Code: link to GitHub issues/PRs/Epic
  • Dogfood: link to dogfooding session/artefact
  • Docs: links to README.md or docs.waku.org (TBD)

Sub-issues

Metadata

Metadata

Labels

Type

No type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions