Merge 'Enable local file connection in Rust binding' from 南宫茜

It's so weird that other bindings can open local file but Rust binding
itself cannot.

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #1095
This commit is contained in:
Pere Diaz Bou
2025-03-05 14:05:35 +01:00

View File

@@ -45,7 +45,11 @@ impl Builder {
let db = limbo_core::Database::open_file(io, self.path.as_str())?;
Ok(Database { inner: db })
}
_ => todo!(),
path => {
let io: Arc<dyn limbo_core::IO> = Arc::new(limbo_core::PlatformIO::new()?);
let db = limbo_core::Database::open_file(io, path)?;
Ok(Database { inner: db })
}
}
}
}