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;
9pub mod uninstall;
10
11#[cfg(test)]
12pub(crate) mod test_helpers;
13
14#[cfg(not(test))]
15impl memory_core::storage::sqlite::SqliteStorage {
16    pub fn new_in_memory() -> anyhow::Result<Self> {
17        Self::new_in_memory_with_embedder(std::sync::Arc::new(memory_core::PlaceholderEmbedder))
18    }
19
20    pub fn new_in_memory_with_embedder(
21        embedder: std::sync::Arc<dyn memory_core::embedder::Embedder>,
22    ) -> anyhow::Result<Self> {
23        Self::new_with_path(std::path::PathBuf::from(":memory:"), embedder)
24    }
25}