Skip to content

Feat/P2P FFI Layer#101

Draft
nipsysdev wants to merge 6 commits intodurability-labs:mainfrom
nipsysdev:feat/ffi_layer
Draft

Feat/P2P FFI Layer#101
nipsysdev wants to merge 6 commits intodurability-labs:mainfrom
nipsysdev:feat/ffi_layer

Conversation

@nipsysdev
Copy link

@nipsysdev nipsysdev commented Mar 3, 2026

Attempt at implementing an FFI Layer for Archivist and producing static & dynamic C libraries for Archivist.
This is focusing on the core P2P logic, not the marketplace.
I tried following the work that was done in the Logos Storage FFI layer.

Build and run the tests:
cd library && make && make test

This PR is still a WIP, here is what I identified as missing:

archivist_context.nim

  • Archivist context isn't processing requests concurrently

libarchivist.nim

  • Missing parsing of configJson and node configuration when instantiating a new archivist node
  • archivist_close seem to be missing some logic

archivist_thread_request.nim

  • Improve callback handling for concurrency

node_debug_request.nim

  • Debug requests processing still need to be implemented

node_info_request.nim

  • I'm not sure about hardcoding archivist version and revision there
  • Missing retrieval of repo path from config

node_lifecycle_request.nim

  • Fix configuration loading srialization issues which made me hardcode the config instead
  • I don't think the data directory creation should be ignored when an exception is thrown

archivist-node/library/archivist_thread_requests/requests/node_storage_request.nim

  • Missing implementation to query repo store
  • Missing implementation to check block existence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant