You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the following approach we can accomplish two things at once:
1. Make it easy to add new Rust backends without sacrifing performance
2. Allow for arbitrary persistence accross the FFI
To accomplish this we can differentiate between a native backend and a
foreign backend. The foreign backend interacts with the FFI `ChangeSet`,
whereas the native backend can just use the Rust changeset directly.
Whenever a new backend is introduced in Rust, a new enum variant may
simply be added to the `PersistenceType`. To build a Sqlite backend, or
a foreign backend, the user will use the `Persister` structure.
Abitrary persistence is allowed by implementing the `Persistence`
trait. This was accomplished with no changes to #756.
I hope 1. motivates this change thoroughly, as we expect BDK will add
support for new backends in the future. I am also interested in the
applications of 2., where a user might be able to do encrypted and cloud
storage.
0 commit comments