Skip to content

chore(cbind): nim-ffi migration [9/9] — flip to libp2p.nim, delete legacy cbind#2780

Draft
gmelodie wants to merge 1 commit into
chore/cbind/ffi/08-relay-peerstore-metricsfrom
chore/cbind/ffi/09-flip
Draft

chore(cbind): nim-ffi migration [9/9] — flip to libp2p.nim, delete legacy cbind#2780
gmelodie wants to merge 1 commit into
chore/cbind/ffi/08-relay-peerstore-metricsfrom
chore/cbind/ffi/09-flip

Conversation

@gmelodie

@gmelodie gmelodie commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

nim-ffi cbind migration — PR train

  1. chore(cbind): nim-ffi migration [1/9] — deps + pinning scaffold #2772 — deps + pinning
  2. chore(cbind): nim-ffi migration [2/9] — new-library scaffold + CI #2773 — scaffold + CI
  3. chore(cbind): nim-ffi migration [3/9] — connectivity & identity #2774 — connectivity
  4. chore(cbind): nim-ffi migration [4/9] — streams & custom protocols (+ echo example) #2775 — streams (+ echo)
  5. chore(cbind): nim-ffi migration [5/9] — pubsub / gossipsub (+ gossipsub example) #2776 — pubsub (+ gossipsub)
  6. chore(cbind): nim-ffi migration [6/9] — kademlia + CID + crypto #2777 — kad + CID + crypto
  7. chore(cbind): nim-ffi migration [7/9] — service discovery + extended peer records #2778 — service discovery
  8. chore(cbind): nim-ffi migration [8/9] — relay, peerstore, metrics (API parity) #2779 — relay / peerstore / metrics
  9. chore(cbind): nim-ffi migration [9/9] — flip to libp2p.nim, delete legacy cbind #2780 — flip + delete legacy ← this PR

Part 9 of a 9-PR train that replaces the hand-rolled cbind/ C bindings with the generated nim-ffi codegen, landing it domain by domain so each PR stays reviewable and CI-green (build the FFI lib + generate bindings + build/run examples).

Targets chore/cbind/ffi/08-relay-peerstore-metrics (stacked).

This PR does

  • git mv cbind/libp2p_ffi.nim cbind/libp2p.nim, replacing the legacy file (recorded as a rename).
  • Deletes the legacy implementation: alloc.nim, ffi_types.nim, types.nim, libp2p.h, the whole libp2p_thread/ tree, and examples/cbindings.c.
  • Collapses the temporary .#cbind-ffi nix target and c-bindings-ffi CI job back into the single final flow.
  • Finalises linters.yml and the copilot instructions.

Review artifact: Net header is unchanged from [8/9] — this PR is deletion + rename + CI/nix consolidation, not new API.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.13%. Comparing base (e09e4dd) to head (d4b789d).

Additional details and impacted files

Impacted file tree graph

@@                              Coverage Diff                               @@
##           chore/cbind/ffi/08-relay-peerstore-metrics    #2780      +/-   ##
==============================================================================
- Coverage                                       81.15%   81.13%   -0.03%     
==============================================================================
  Files                                             170      170              
  Lines                                           31027    31027              
  Branches                                           13       12       -1     
==============================================================================
- Hits                                            25180    25173       -7     
- Misses                                           5847     5854       +7     

see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmelodie gmelodie mentioned this pull request Jul 7, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: new

Development

Successfully merging this pull request may close these issues.

2 participants