Skip to content

Commit 40866f9

Browse files
committed
Enable Rust client by default
1 parent 1c904a8 commit 40866f9

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ final class SyncOptions {
5757
}
5858

5959
/// The PowerSync SDK offers two different implementations for receiving sync
60-
/// lines: One handling most logic in Dart, and a newer one offloading that work
61-
/// to the native PowerSync extension.
60+
/// lines.
61+
///
62+
/// The recommended option is [rust], which can offload most work of the sync
63+
/// client to the native PowerSync extension. `.dart` is a legacy implementation
64+
/// that will be removed in a future release of the PowerSync Dart SDK.
6265
enum SyncClientImplementation {
6366
/// A sync implementation that decodes and handles sync lines in Dart.
6467
@Deprecated(
@@ -72,14 +75,10 @@ enum SyncClientImplementation {
7275
///
7376
/// This implementation can be more performant than the Dart implementation,
7477
/// and supports receiving sync lines in a more efficient format.
75-
///
76-
/// Note that this option is currently experimental.
77-
@experimental
7878
rust;
7979

8080
/// The default sync client implementation to use.
81-
// ignore: deprecated_member_use_from_same_package
82-
static const defaultClient = dart;
81+
static const defaultClient = rust;
8382
}
8483

8584
@internal

packages/powersync_core/test/sync/in_memory_sync_test.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,13 @@ void main() {
3030
group('rust sync client', () {
3131
_declareTests(
3232
'json',
33-
SyncOptions(
34-
syncImplementation: SyncClientImplementation.rust,
35-
retryDelay: Duration(milliseconds: 200)),
33+
SyncOptions(retryDelay: Duration(milliseconds: 200)),
3634
false,
3735
);
3836

3937
_declareTests(
4038
'bson',
41-
SyncOptions(
42-
syncImplementation: SyncClientImplementation.rust,
43-
retryDelay: Duration(milliseconds: 200)),
39+
SyncOptions(retryDelay: Duration(milliseconds: 200)),
4440
true,
4541
);
4642
});

packages/powersync_core/test/test_server.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ final class TestServer {
4444
maxConnectionCount = max(connectionCount, maxConnectionCount);
4545

4646
stream() async* {
47-
var blob = "*" * 5000;
4847
for (var i = 0; i < 50; i++) {
49-
yield {"token_expires_in": tokenExpiresIn, "blob": blob};
48+
yield {"token_expires_in": tokenExpiresIn};
5049
await Future<void>.delayed(Duration(microseconds: 1));
5150
}
5251
}

0 commit comments

Comments
 (0)