Skip to content

Conversation

simolus3
Copy link
Contributor

@simolus3 simolus3 commented Sep 2, 2025

Since we'll likely want to show information about sync streams in the diagnostics app, we need that tool to support the Rust client.
This requires some hacks because the diagnostic app displays information not exposed from the SDKs, such as:

  • Involved buckets.
  • Progress information (okay, that is exposed - but not on a per-bucket granularity).
  • Metadata and payload data sizes.

For the JS client, we've used a custom bucket storage implementation that intercepts some operations to update metadata. For the Rust client, we can't use the exact same approach because the internal bucket storage is written in Rust and not patchable from JS. However, we can intercept the powersync_control calls to infer the sync lines, and then use that to derive progress information from there.

The Rust client is enabled by default, but this can be changed in the configuration:

grafik

After connecting, the pages show whether the Rust or JS client is used ('ve added a new field to SyncStatus for this):

grafik

Copy link

changeset-bot bot commented Sep 2, 2025

🦋 Changeset detected

Latest commit: a79636f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@powersync/common Minor
@powersync/diagnostics-app Patch
@powersync/adapter-sql-js Patch
@powersync/node Patch
@powersync/op-sqlite Patch
@powersync/react-native Patch
@powersync/tanstack-react-query Patch
@powersync/web 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

Copy link
Collaborator

@stevensJourney stevensJourney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with the changes here from my side :)

@simolus3 simolus3 merged commit 4dc0dbf into main Sep 3, 2025
9 checks passed
@simolus3 simolus3 deleted the rust-diagnostics-app branch September 3, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants