mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-22 07:32:16 -04:00
8c5f40db8d
* Add the `snapshot` crate, which implements snapshotting at a low level - Requires making `BlobHash` be `Serialize` and `Deserialize`. For arcane macro-ology reasons, this requires writing `BlobHash::SIZE` instead of `Self::SIZE` (it gets embedded in a visitor struct or something). - Requires adding two new operators to `BlobStore`. - Adds a return value to `Page::save_content_hash`, for convenience. - Impls `DerefMut` for `Pages`. - **Scary change:** adds `Table::pages_mut`. I think possibly this operator should be `unsafe`, since write access to the `Pages` allows an undisciplined caller to violate the `Table`'s assumptions by corrupting a `Page`. It seems like an anti-pattern to mark a method `unsafe` on the grounds that misusing its return value can cause UB, but I don't see a plausible alternative without making most methods on `Page` unsafe. Open to feedback on this one! * Nix `Table::pages_mut` * Address Mazdak's feedback * Use `thiserror` rather than `anyhow` for better error hygiene