Skip to content

Commit 4d171a4

Browse files
committed
Add new sync implementation
1 parent 3b73435 commit 4d171a4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

packages/powersync_core/lib/src/sync/options.dart

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,32 @@ enum SyncClientImplementation {
7474
static const defaultClient = dart;
7575
}
7676

77+
/// The PowerSync SDK offers two different implementations for receiving sync
78+
/// lines: One handling most logic in Dart, and a newer one offloading that work
79+
/// to the native PowerSync extension.
80+
enum SyncClientImplementation {
81+
/// A sync implementation that decodes and handles sync lines in Dart.
82+
@Deprecated(
83+
"Don't use SyncClientImplementation.dart directly, "
84+
"use SyncClientImplementation.defaultClient instead.",
85+
)
86+
dart,
87+
88+
/// An experimental sync implementation that parses and handles sync lines in
89+
/// the native PowerSync core extensions.
90+
///
91+
/// This implementation can be more performant than the Dart implementation,
92+
/// and supports receiving sync lines in a more efficient format.
93+
///
94+
/// Note that this option is currently experimental.
95+
@experimental
96+
rust;
97+
98+
/// The default sync client implementation to use.
99+
// ignore: deprecated_member_use_from_same_package
100+
static const defaultClient = dart;
101+
}
102+
77103
@internal
78104
extension type ResolvedSyncOptions(SyncOptions source) {
79105
factory ResolvedSyncOptions.resolve(

0 commit comments

Comments
 (0)