Skip to main content

mag/
lib.rs

1pub mod app_paths;
2pub mod benchmarking;
3pub(crate) mod config_writer;
4#[cfg(feature = "daemon-http")]
5pub mod daemon;
6pub mod memory_core;
7pub mod setup;
8pub(crate) mod tool_detection;
9
10#[cfg(test)]
11pub(crate) mod test_helpers;
12
13#[cfg(not(test))]
14impl memory_core::storage::sqlite::SqliteStorage {
15    pub fn new_in_memory() -> anyhow::Result<Self> {
16        Self::new_in_memory_with_embedder(std::sync::Arc::new(memory_core::PlaceholderEmbedder))
17    }
18
19    pub fn new_in_memory_with_embedder(
20        embedder: std::sync::Arc<dyn memory_core::embedder::Embedder>,
21    ) -> anyhow::Result<Self> {
22        Self::new_with_path(std::path::PathBuf::from(":memory:"), embedder)
23    }
24}