Skip to main content

SyncClientImplementation

Enumeration Members

Enumeration MemberValueDescription
JAVASCRIPT"js"Decodes and handles sync lines received from the sync service in JavaScript. This is the default option. Deprecated Don't use SyncClientImplementation.JAVASCRIPT directly. Instead, use DEFAULT_SYNC_CLIENT_IMPLEMENTATION or omit the option. The explicit choice to use the JavaScript-based sync implementation will be removed from a future version of the SDK.
RUST"rust"Experimental This implementation offloads the sync line decoding and handling into the PowerSync core extension. While this implementation is more performant than SyncClientImplementation.JAVASCRIPT, it has seen less real-world testing and is marked as experimental at the moment. ## Compatibility warning The Rust sync client stores sync data in a format that is slightly different than the one used by the old JAVASCRIPT implementation. When adopting the RUST client on existing databases, the PowerSync SDK will migrate the format automatically. Further, the JAVASCRIPT client in recent versions of the PowerSync JS SDK (starting from the version introducing RUST as an option) also supports the new format, so you can switch back to JAVASCRIPT later. However: Upgrading the SDK version, then adopting RUST as a sync client and later downgrading the SDK to an older version (necessarily using the JavaScript-based implementation then) can lead to sync issues.