pm/FURPS/application/nim_ffi.md

32 lines
937 B
Markdown
Raw Normal View History

2025-08-04 15:53:39 +10:00
# Nim-FFI FURPS
2025-07-22 15:28:19 +10:00
## Functionality
1. Provides the core logic needed to expose any synchronous or asynchronous Nim library to a C-FFI library.
2025-07-22 15:28:19 +10:00
## Usability
2025-08-04 15:53:39 +10:00
1. Introduce new pragma definitions, such as `{.ffi.}`, to appropriately annotate types and procedures.
2025-07-29 09:28:39 +02:00
2. Any Nim project can use it and can be installed using Nimble,
2025-08-04 15:53:39 +10:00
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.
2025-07-22 15:28:19 +10:00
## Reliability
2025-08-04 15:53:39 +10:00
1. Nim-FFI does not leak memory.
2. The exposed C library never hangs when working asynchronously.
2025-07-22 15:28:19 +10:00
## Performance
## Supportability
2025-07-29 09:28:39 +02:00
1. The exposed C library can be used in Golang.
2. The exposed C library can be used in Rust.
3. The exposed C library can be used in Python.
2025-07-22 15:28:19 +10:00
## + (Privacy, Anonymity, Deployments)
1. `nwaku` repository uses `nim-ffi` to expose the existing `libwaku` functionality.