Skip to content

API improvements for Tauri SDK#11

Open
simolus3 wants to merge 6 commits intomainfrom
leased-connections-static
Open

API improvements for Tauri SDK#11
simolus3 wants to merge 6 commits intomainfrom
leased-connections-static

Conversation

@simolus3
Copy link
Collaborator

This adds a few new APIs I needed for the Tauri SDK, but I believe the new features should be useful for Rust users as well.

First, LeasedConnection is now a concrete type instead of a trait. This makes it much easier for users to use and store connections in structs. I've also changed the implementation of reader() and writer() on pools to allow LeasedConnection to be + 'static (previously it would reference the database from which the connection has been obtained). This isn't less efficient in this case since the pool is already an Arc we can cheaply clone, but makes LeasedConnections easier to store in other structs.

Additionally, this adds the watch_all_updates stream emitting a set of tables that have been written to since the last poll. This is necessary to forward updates to JavaScript, where we need to update listeners without knowing which tables they're interested in.

I've also added an internal APIs to get the internal sync stream status from the core extension out of the public sync status. We don't want to expose that to end users, but it makes it easier to forward sync status updates to the JavaScript SDK.

Finally, this updates rusqlite and prepares a 0.0.5 release.

@simolus3 simolus3 marked this pull request as ready for review March 18, 2026 14:53
@simolus3 simolus3 requested a review from rkistner March 18, 2026 14:53
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.

1 participant