diff --git a/FURPS/application/nim_ffi.md b/FURPS/application/nim_ffi.md index 7c8656d..cb865dd 100644 --- a/FURPS/application/nim_ffi.md +++ b/FURPS/application/nim_ffi.md @@ -1,4 +1,4 @@ -# {Feature Name} FURPS +# Nim-FFI FURPS ## Functionality @@ -6,21 +6,19 @@ ## Usability -1. Introduce new pragma definitions, such as `{.ffi.}`, to appropriately annotate types and procedures. +1. Introduce new pragma definitions, such as `{.ffi.}`, to appropriately annotate types and procedures. 2. Any Nim project can use it and can be installed using Nimble, -similarly to how nim-chronos is imported. -3. The interaction with the exposed C library is through JSON. -4. The interaction with the exposed C library is through protobuf. + similarly to how nim-chronos is imported. +3. The interaction with the exposed C library can be done using JSON. +4. The interaction with the exposed C library can be done using protobuf. ## Reliability -1. The exposed C library does not leak memory. +1. Nim-FFI does not leak memory. 2. The exposed C library never hangs when working asynchronously. ## Performance -1. ... - ## Supportability 1. The exposed C library can be used in Golang. diff --git a/draft-roadmap/nim_usage_improvements.md b/draft-roadmap/nim_usage_improvements.md index 1f23aab..7c1dbe4 100644 --- a/draft-roadmap/nim_usage_improvements.md +++ b/draft-roadmap/nim_usage_improvements.md @@ -76,16 +76,29 @@ Note: maybe taken over by Vac-Nim - [ ] Docs: links to README.md or docs.waku.org (TBD) -### Create nim-ffi, a Nim project to easily exposes c-bindings from Nim +### Create nim-ffi, a library to easily exposes c-bindings from Nim **Owner**: nwaku -**FURPS**: -This deliverable takes care of the following [Nim FFI](/FURPS/application/nim_ffi.md) FURPS: +**Feature**: [Nim FFI](/FURPS/application/nim_ffi.md) + +**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. -- F1. -- U1. -- U2. - +1. `nwaku` repository uses `nim-ffi` to expose the existing `libwaku` functionality. **Checklist**: