I’m developing a To Do app using GTK and Rust, what would be the recommended way of storing application data such as lists and tasks, I was thinking about SQLite but is there something better?
1 Like
SQLite sounds good, e.g. with Diesel — Rust library // Lib.rs or SQLx — db interface for Rust // Lib.rs.
Alternatively, you can use Settings in gio - Rust with Variant in glib - Rust as shown in the gtk4-rs book.
Just a note: never store application data in GSettings. Use it only to store state and/or actual settings.
Sandboxed apps store settings inside a simple key/value text file, which means storing a lot of complex data is going to be inefficient and generally bad.
3 Likes
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.