C ABI or minimal FFI-friendly ABI #12
Unanswered
canadaduane
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
From praveen6747:
I think you're kind of asking two questions, let me see if that's right:
While Loro itself is built in Rust and has a library (see https://crates.io/crates/loro, https://crates.io/crates/loro-ffi), LoroExtended is typescript-only. So there are a few layers here that you would need to figure out to make it compatible with Flutter--your instinct around an FFI for Loro itself is correct, as that would be the first hurdle.
A lighter-weight step is to just communicate with a LoroExtended Repo of docs. The websocket adapter has a CBOR protocol that you could use to communicate, see https://github.com/SchoolAI/loro-extended/blob/main/adapters/websocket/PROTOCOL.md
I've actually used this protocol in a standalone Rust instance to talk to a LoroExtended Repo without having to implement the full "document repo" code. In my case, I was adapting the Zed editor (which already has its own CRDT for text) to communicate with LoroExtended. So that may not be as useful to you.
All reactions