Skip to content

Add sync implementation from core extension #599

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

Merged
merged 15 commits into from
Jun 18, 2025
Merged

Add sync implementation from core extension #599

merged 15 commits into from
Jun 18, 2025

Conversation

simolus3
Copy link
Contributor

This adds an option to use a new sync implementation from the core extension instead of the JavaScript implementation. The core implementation is marked as experimental, and we default to the old implementation.

The implementation changes are surprisingly compact:

  1. In AbstractRemote.ts, this introduces "raw" variant of the sync stream methods. Those don't parse sync lines, instead returning them as strings (HTTP streaming) or buffers (RSocket).
  2. In AbstractStreamingSyncImplementation.ts, copy the existing sync implementation into a method and add a new one for the core sync implementation.

See also:

Copy link

changeset-bot bot commented May 13, 2025

🦋 Changeset detected

Latest commit: 3e5394d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@powersync/common Minor
@powersync/node Minor
@powersync/web Minor
@powersync/react-native Minor
@powersync/op-sqlite Patch
@powersync/tanstack-react-query Patch
@powersync/diagnostics-app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@simolus3 simolus3 requested a review from stevensJourney June 16, 2025 12:33
@stevensJourney
Copy link
Collaborator

Overall I think the work done here is pretty cool and well documented. I left some minor comments, but this looks good to me.

@simolus3 simolus3 changed the title WIP: Add sync implementation from core extension Add sync implementation from core extension Jun 18, 2025
@simolus3 simolus3 marked this pull request as ready for review June 18, 2025 09:27
@simolus3 simolus3 requested a review from stevensJourney June 18, 2025 10:38
@simolus3 simolus3 merged commit 9ced54d into main Jun 18, 2025
9 of 10 checks passed
@simolus3 simolus3 deleted the rust-core-sync branch June 18, 2025 15:06
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.

2 participants