|
3 | 3 | **Estimated date of completion**: 19 Dec |
4 | 4 |
|
5 | 5 | **Resources Required for 2025H2**: |
6 | | -- 1 nwaku eng for 2 months |
| 6 | +- 2 nwaku eng for 3 months |
7 | 7 | - Support from Vac/Nim team |
8 | 8 |
|
9 | 9 | Improve usage of Nim related tooling and design patterns by proceedings with PoCs to discover potential gains and caveats. |
@@ -69,6 +69,38 @@ Note: maybe taken over by Vac-Nim |
69 | 69 |
|
70 | 70 | - U7. When wrapping the C API, a protobuf definition can be used to generate native types for the host language (PoC). |
71 | 71 |
|
| 72 | +**Checklist**: |
| 73 | +- [ ] Specs: link to specs and/or API definition |
| 74 | +- [ ] Code: link to GitHub issues/PRs/Epic |
| 75 | +- [ ] Dogfood: link to dogfooding session/artefact |
| 76 | +- [ ] Docs: links to README.md or docs.waku.org (TBD) |
| 77 | + |
| 78 | + |
| 79 | +### Create nim-ffi, a library to easily exposes c-bindings from Nim |
| 80 | + |
| 81 | +**Owner**: nwaku |
| 82 | + |
| 83 | +**Feature**: [Nim FFI](/FURPS/application/nim_ffi.md) |
| 84 | + |
| 85 | +**FURPS**: |
| 86 | + |
| 87 | +- F1. Provides the core logic needed to expose any synchronous or asynchronous Nim library to a C-FFI library. |
| 88 | + |
| 89 | +- U1. Introduce new pragma definitions, such as `{.ffi.}`, to appropriately annotate types and procedures. |
| 90 | +- U2. Any Nim project can use it and can be installed using Nimble, |
| 91 | + similarly to how nim-chronos is imported. |
| 92 | +- U3. The interaction with the exposed C library can be done using JSON. |
| 93 | +- U4. The interaction with the exposed C library can be done using protobuf. |
| 94 | + |
| 95 | +- R1. Nim-FFI does not leak memory. |
| 96 | +- R2. The exposed C library never hangs when working asynchronously. |
| 97 | + |
| 98 | +- S1. The exposed C library can be used in Golang. |
| 99 | +- S2. The exposed C library can be used in Rust. |
| 100 | +- S3. The exposed C library can be used in Python. |
| 101 | + |
| 102 | +- +1. `nwaku` repository uses `nim-ffi` to expose the existing `libwaku` functionality. |
| 103 | + |
72 | 104 | **Checklist**: |
73 | 105 | - [ ] Specs: link to specs and/or API definition |
74 | 106 | - [ ] Code: link to GitHub issues/PRs/Epic |
|
0 commit comments