PowerSync keeps a client-side SQLite database in sync with your backend database. Changes appear across users and devices in real-time, user interactions feel instant and your app continues to work even when offline. Supports Postgres, MongoDB, MySQL, and SQL Server. Client SDKs are available for a wide range of environments including web, mobile, desktop, headless and embedded.
Note
This SDK is currently in an alpha state, intended for external testing and public feedback. Expect breaking changes and instability as development continues.
This repository contains code used to build a PowerSync SDK for native development.
PowerSync is available as a Rust crate in powersync/, and on crates.io as the powersync crate.
To start an example:
- Run the NodeJS demo without
the sync service:
docker compose up --scale powersync=0 - Start a sync service instance with sync streams configured (see sync rules below).
- Compile and run an example here:
cargo run -p egui_todolist.
# Sync Streams docs: https://docs.powersync.com/sync/streams/overview
streams:
lists:
query: SELECT * FROM lists #WHERE owner_id = auth.user_id()
auto_subscribe: true
todos:
query: SELECT * FROM todos WHERE list_id = subscription.parameter('list') #AND list_id IN (SELECT id FROM lists WHERE owner_id = auth.user_id())
config:
edition: 3