-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backup your account without a second device #1479
base: main
Are you sure you want to change the base?
Conversation
a30393e
to
ab3f8e9
Compare
ff524ac
to
6a2b7d0
Compare
6a2b7d0
to
f4e0a40
Compare
258b2d1
to
7912ab1
Compare
ed53c1e
to
7b98367
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll have to give this a deeper look later on, but it looks good, I'm not sure how it will work from webassembly from just this PR, though.
} | ||
|
||
impl BackupOptions { | ||
#[cfg(not(target_arch = "wasm32"))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the plan for web support/how would i use this from the web?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just like how we have a handler that consumes the AsyncRead
to a file for native here, we'd want to do something similar on the browser file handle.
pub use backup_importer::BackupImporter; | ||
|
||
// Increment on breaking changes | ||
const BACKUP_VERSION: u32 = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what qualifies as a breaking change where we need to increment this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add a new optional field to one of the structs that's exported, we'd want to put some logic on the importer that says something like... If backup_version < 1, set new field to this default value, otherwise leave it be
or maybe use this separate hydrater entirely. That's just one example. Really this is just a field that I'm sure will be useful to delineate between updates, and make importing old archives possible.
Proto: xmtp/proto#239