Initial Bard library commit.

This was added to test the database into server context pipeline.
This commit is contained in:
2025-09-02 14:00:19 -04:00
parent 3fc6bf0666
commit 877d7e15a3
4 changed files with 279 additions and 1 deletions

View File

@ -4,4 +4,16 @@ mod info;
use tavern::Database;
pub use crate::info::{get_name, get_version};
pub async fn init_database<P>(path: P)
-> Result<std::sync::Arc<Database>, Box<dyn std::error::Error>>
where P: AsRef<std::path::Path>
{
let db = Database::open(path).await?;
Ok(std::sync::Arc::new(db))
}