powersync-js icon indicating copy to clipboard operation
powersync-js copied to clipboard

WIP: Add sync implementation from core extension

Open simolus3 opened this issue 7 months ago • 1 comments

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:

  • The implementation PR for the core extensions: github.com/powersync-ja/powersync-sqlite-core/pull/70
  • The equivalent PR for the Kotlin SDK: https://github.com/powersync-ja/powersync-kotlin/pull/192

simolus3 avatar May 13 '25 15:05 simolus3

🦋 Changeset detected

Latest commit: 3e5394de400a888467582ae16748b950bfbd6073

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

changeset-bot[bot] avatar May 13 '25 15:05 changeset-bot[bot]

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

stevensJourney avatar Jun 17 '25 12:06 stevensJourney