mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-24 03:34:18 +01:00
24 lines
452 B
Rust
24 lines
452 B
Rust
use wasm_bindgen::prelude::*;
|
|
|
|
#[wasm_bindgen]
|
|
pub struct Database {
|
|
_inner: lig_core::Database,
|
|
}
|
|
|
|
#[wasm_bindgen]
|
|
impl Database {
|
|
pub fn open(path: &str) -> Database {
|
|
let io = IO {};
|
|
let inner = lig_core::Database::open(&io, path).unwrap();
|
|
Database { _inner: inner }
|
|
}
|
|
}
|
|
|
|
struct IO {}
|
|
|
|
impl lig_core::IO for IO {
|
|
fn open(&self, _path: &str) -> anyhow::Result<lig_core::PageSource> {
|
|
todo!();
|
|
}
|
|
}
|