WIP: Add sync implementation from core extension
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:
- 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). - 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
🦋 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
Overall I think the work done here is pretty cool and well documented. I left some minor comments, but this looks good to me.