Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded replica support #3

Open
leccles1 opened this issue Jul 4, 2024 · 1 comment
Open

Embedded replica support #3

leccles1 opened this issue Jul 4, 2024 · 1 comment

Comments

@leccles1
Copy link

leccles1 commented Jul 4, 2024

Hey Simon,

Incredible to see this package pop up, I'd spent the last couple weeks attempting to write my own Hrana client. I previously reached out on the sqlite3 package with regards to libsql support .

I was wondering if embedded replica support is on the horizon at all - I know the sync functionality isn't part of the Hrana specification so apologies if this question is out of the scope/relevance of this library

Thanks!

@simolus3
Copy link
Owner

simolus3 commented Jul 4, 2024

This is not really in scope for either package:sqlite3 or package:hrana - re-implementing the synchronization mechanism in Dart would just be very complex.

I think it would be interesting to explore a package:libsql that is mostly compatible with an async variant of package:sqlite3 (using the same result types).
Given that libsql is only really accessible from Rust when one wants to benefit from native async support, we'd necessarily have to write a custom wrapper to access it from dart:ffi (awaiting stuff in rust and then using Dart send ports to communicate results). That's possible, but super annoying without native assets since it's a lot of work to ship precompiled native libraries at the moment.

If I find some time I can work on a prototype earlier, but I think this depends on native assets (dart-lang/sdk#50565) to be distributable.

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

No branches or pull requests

2 participants