mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
expose to Tauri to ensure it works
This commit is contained in:
1 parent
62cb1e5902
commit
098ee45b81
12 files changed
+108
-53
No files matched your search
@@ -7,10 +7,13 @@ use std::{
|
||||
use anyhow::{Context, Ok};
|
||||
use cjdic2_core::db::Database;
|
||||
|
||||
fn main() -> Result<(), anyhow::Error> {
|
||||
let db = Database::new("test.db")?;
|
||||
mod common;
|
||||
use common::get_db_path;
|
||||
|
||||
let zip_dir = Path::new("src-tauri/resources/yomitan");
|
||||
fn main() -> Result<(), anyhow::Error> {
|
||||
let db = Database::new(get_db_path())?;
|
||||
|
||||
let zip_dir = Path::new("tmp/yomitan");
|
||||
println!("zip_dir: {:?}", absolute(zip_dir)); // Relative to workspace root
|
||||
|
||||
for entry in
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
pub fn get_db_path() -> PathBuf {
|
||||
PathBuf::from("test.db")
|
||||
}
|
||||
@@ -3,8 +3,11 @@ use std::time::Instant;
|
||||
use anyhow::Ok;
|
||||
use cjdic2_core::db::Database;
|
||||
|
||||
mod common;
|
||||
use common::get_db_path;
|
||||
|
||||
fn main() -> Result<(), anyhow::Error> {
|
||||
let db = Database::new("test.db")?;
|
||||
let db = Database::new(get_db_path())?;
|
||||
|
||||
let start = Instant::now();
|
||||
let rs = db.yomitan().search_yomitan("擦る", "する", 10, 0)?;
|
||||
|
||||
@@ -3,8 +3,11 @@ use std::time::Instant;
|
||||
use anyhow::Ok;
|
||||
use cjdic2_core::db::Database;
|
||||
|
||||
mod common;
|
||||
use common::get_db_path;
|
||||
|
||||
fn main() -> Result<(), anyhow::Error> {
|
||||
let db = Database::new("test.db")?;
|
||||
let db = Database::new(get_db_path())?;
|
||||
|
||||
let start = Instant::now();
|
||||
db.yomitan().create_schema()?;
|
||||
|
||||
Reference in new issue
Block a user