Replies: 5 comments 11 replies
-
TLDRTLDR of everything on this discussion is that we have 3 potential paths forward: 1.a. Raw FFIs from assuming either approach becomes TOP-priority on SRI roadmap for the short term, IMO realistic timelines are: note: there's a dedicated section for the UniFFI approach (and its compromises) below in this discussion |
Beta Was this translation helpful? Give feedback.
-
API boundariesBoth Raw FFI and UniFFI approaches should have clear and concise API boundaries. That means we should not expose every single crate from IMHO we should resist the urge of trying to expose every "elegant" Rust construct that exists on the SRI stack. Our mission here is to enable straightforward implementations in C/C++, not force implementers into overengineered paths just for the sake of it. In fact, this conservative FFI philosophy is already somewhat established on What FFI API boundaries SHOULD cover:
What FFI API boundaries SHOULD NOT cover:
These things should be either constrained into Rust-land (when absolutely necessary for building the FFI), or simply not included at all. |
Beta Was this translation helpful? Give feedback.
-
lifetime cleanup as a pre-requisite for Raw FFIcrates on @Shourya742 has done some extensive analysis on how the current The next step is the lifetime cleanup described on this hackmd doc. So far we haven't decided when this cleanup will happen. This lifetime cleanup matters for the Raw FFI approach because the C/C++ bindings needs owned, stable, language-neutral types. We could theoretically write the Raw FFI code while trying to work around those limitations on the Rust side of the bindings. More specifically, we could build a large adapter layer around borrowed Sv2 messages, So if we go in the Raw FFI direction, we should consider lifetime cleanup as a potential pre-requisite. |
Beta Was this translation helpful? Give feedback.
-
Raw FFI as a standalone repo?if we go with the Raw FFI approach, we could consider having a standalone repository, just like we have github.com/stratum-mining/sv2-uniffi that would help separate concerns and keep a clear versioning/release schedule (downstream to a few candidates that come to mind:
alternatively, it could live as a new the benefit of that would be that every |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
there's an adopter (with around 5 to 10% of network hashrate) expressing interest in FFI for C++ integration
this discussion aims to discuss technical approaches, tradeoffs, align expectations and settle on a plan for next steps
Beta Was this translation helpful? Give feedback.
All reactions