awesomeapp-dev / rust-desktop-app

Base desktop application code with Tauri, Native Web Components and SurrealDB (follow the VMES app architecture)
Apache License 2.0
267 stars 28 forks source link

on-file SurrealDB "Unable to load the specified datastore" #1

Closed Aecron closed 2 years ago

Aecron commented 2 years ago

Hello,

First of all, this template looks quite awesome, thank you for your contribution. However, I encounter a slight issue (being absolutely new at Rust, SurrealDB, and Tauri).

The very first thing I've tried to modify was the persistence of the datastore, by providing a "file://" path to the Datastore constructor in store/mod.rs Store::new().

Unfortunately, that yielded the error Ds("Unable to load the specified datastore").

Trying a vanilla loading of a file-persistent Datastore at the main() level had the same result, while I encounter no issue in a manually bootstrapped Rust-Tauri-SurrealDB codebase.

Any idea what may cause this?

Aecron commented 2 years ago

Found it!

Cargo.toml

# For dev and to easy first time build experience, just have memory surrealdb for  now.
surrealdb = {version = "1.0.0-beta.8", default-features=false, features = ['parallel', 'kv-mem'] }
jeremychone commented 2 years ago

Thanks for reporting. I need to find bubble up this note somewhere to that dev knows that by default, only memory.

subralog commented 1 year ago

so how do we create a file store with surrealdb? any changes need to be made to the feature flags?