diff --git a/db/src/lib.rs b/db/src/lib.rs index ef47275d..9c9ac6fa 100644 --- a/db/src/lib.rs +++ b/db/src/lib.rs @@ -55,11 +55,11 @@ mod tx_checking; pub mod types; mod upsert_resolution; -// Export these for reference from tests. cfg(test) should work, but doesn't. -// #[cfg(test)] +// Export these for reference from sync code and tests. pub use bootstrap::{ TX0, USER0, + V1_PARTS, }; pub static TIMELINE_MAIN: i64 = 0; @@ -108,6 +108,7 @@ pub use tx_observer::{ pub use types::{ AttributeSet, DB, + Partition, PartitionMap, TransactableValue, }; diff --git a/db/src/types.rs b/db/src/types.rs index 0e2ed3bd..92ee04cb 100644 --- a/db/src/types.rs +++ b/db/src/types.rs @@ -95,6 +95,7 @@ impl Partition { /// Map partition names to `Partition` instances. #[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialOrd, PartialEq)] +#[cfg_attr(feature = "syncable", derive(Serialize,Deserialize))] pub struct PartitionMap(BTreeMap); impl Deref for PartitionMap { diff --git a/tolstoy/Cargo.toml b/tolstoy/Cargo.toml index a0025e27..12e9e9db 100644 --- a/tolstoy/Cargo.toml +++ b/tolstoy/Cargo.toml @@ -31,6 +31,7 @@ path = "../core-traits" [dependencies.mentat_db] path = "../db" +features = ["syncable"] [dependencies.db_traits] path = "../db-traits"