Skip to content

Commit 5a6ac7a

Browse files
committed
Merge branch 'main' into feat/powersync-sqlcipher
2 parents dbc312a + 7d86e3d commit 5a6ac7a

File tree

1 file changed

+8
-43
lines changed

1 file changed

+8
-43
lines changed

packages/powersync/README.md

Lines changed: 8 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,19 @@ flutter pub add powersync
2424

2525
# Getting Started
2626

27-
Our [full SDK reference](https://docs.powersync.com/client-sdk-references/flutter) contains everything you need to know to get started implementing PowerSync in your project.
27+
Our [full SDK reference](https://docs.powersync.com/client-sdk-references/flutter) contains everything you need to know to get started implementing PowerSync in your project.
2828

2929
## **Web support - Beta**
3030

31-
Web support in version 1.9.0 is currently in a beta release. This means it is safe to use in production, provided that you've tested your use cases.
31+
Flutter Web support in version `^1.9.0` is currently in a beta release. It is functionally ready for production use, provided that you've tested your use cases.
32+
33+
Please familiarize yourself with the limitations for Flutter Web documented [here](https://docs.powersync.com/client-sdk-references/flutter/flutter-web-support#limitations).
3234

3335
### Demo app
3436

3537
The easiest way to test Flutter Web support is to run the [Supabase Todo-List](https://github.com/powersync-ja/powersync.dart/tree/main/demos/supabase-todolist) demo app:
3638

37-
1. Checkout [this repo's](https://github.com/powersync-ja/powersync.dart/tree/main) `main` branch.
39+
1. Clone [this repo](https://github.com/powersync-ja/powersync.dart/tree/main).
3840

3941
- Note: If you are an existing user updating to the latest code after a git pull, run `melos exec 'flutter pub upgrade'` in the repo's root directory and make sure it succeeds.
4042

@@ -45,52 +47,15 @@ The easiest way to test Flutter Web support is to run the [Supabase Todo-List](h
4547

4648
### Installing PowerSync in your own project
4749

48-
Install the latest version of the package, for example:
50+
Install the [latest version](https://pub.dev/packages/powersync/versions) of the package, for example:
4951

5052
```
5153
flutter pub add powersync:'^1.9.0'
5254
```
5355

54-
The latest version can be found [here](https://pub.dev/packages/powersync/versions).
55-
56-
### Additional config
57-
58-
Web support requires `sqlite3.wasm` and worker (`powersync_db.worker.js` and `powersync_sync.worker.js`) assets to be served from the web application. They can be downloaded to the `web` directory by running the following command in your application's root folder.
59-
60-
```dart
61-
dart run powersync:setup_web
62-
```
63-
64-
The same code is used for initializing native and web `PowerSyncDatabase` clients.
65-
66-
### Limitations
67-
68-
The API for Web is essentially the same as for native platforms, however, some features within `PowerSyncDatabase` clients are not available.
69-
70-
#### Imports
71-
72-
Flutter Web does not support importing directly from `sqlite3.dart` as it uses `dart:ffi`.
73-
74-
Change imports from
75-
76-
```Dart
77-
import 'package/powersync/sqlite3.dart`
78-
```
79-
80-
to
81-
82-
```Dart
83-
import 'package/powersync/sqlite3_common.dart'
84-
```
85-
86-
In code which needs to run on the Web platform. Isolated native specific code can still import from `sqlite3.dart`.
87-
88-
#### Database connections
89-
90-
Web DB connections do not support concurrency. A single DB connection is used. `readLock` and `writeLock` contexts do not
91-
implement checks for preventing writable queries in read connections and vice-versa.
56+
#### Additional config
9257

93-
Direct access to the synchronous `CommonDatabase` (`sqlite.Database` equivalent for web) connection is not available. `computeWithDatabase` is not available on web.
58+
Additional config is required for web projects. Please see our docs [here](https://docs.powersync.com/client-sdk-references/flutter/flutter-web-support#additional-config) for details.
9459

9560
# Changelog
9661

0 commit comments

Comments
 (0)