From 71921ee178b158f61c1c091e615b972f20b6523e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E8=8C=9C?= Date: Wed, 5 Mar 2025 17:38:23 +0800 Subject: [PATCH] Enable local file connection in Rust binding It's so weird that other bindings can open local file but Rust binding itself cannot. --- bindings/rust/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bindings/rust/src/lib.rs b/bindings/rust/src/lib.rs index 06f268f90..b1c8d6439 100644 --- a/bindings/rust/src/lib.rs +++ b/bindings/rust/src/lib.rs @@ -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 = Arc::new(limbo_core::PlatformIO::new()?); + let db = limbo_core::Database::open_file(io, path)?; + Ok(Database { inner: db }) + } } } }