Use SQLite In A Tauri App
NOTE: This does not at all feel like the best way to do things. I tried using: `tauri::PathResolver`` but couldn't figure out how to get it to work.
Also, bascially don't use these notes yet, there still a work in progress, but I'm trying to get othet stuff working too
Create a new Tauri App
`cargo create-tauri-app`
Fill out the stuff
cd into the new direcory
Do:
npm add https://github.com/tauri-apps/tauri-plugin-sql#v1
Might need to do `npm install`` here, but it doesn't look like it on first blush
Add this to `src-tauri/Cargo.toml``
Code
// NOTE: THis isn't necessary, I don't think
// but
[dependencies.tauri-plugin-sql]
git = "https://github.com/tauri-apps/plugins-workspace"
branch = "v1"
features = ["sqlite"]
Add `.plugin(tauri_plugin_sql::Builder::default().build())`` to the tauri setup in `src-tauri/src/main.rs`` like:
Code
use dirs;
use ;
use fs;
use PathBuf;