emarifer / rust-slint-todolist-demo

Rust/Slint desktop demo application that uses the Slint GUI framework and persists data in a database-like binary file, performs a full CRUD, and displays a to-do list in GUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rust-slint-todolist-demo


Rust/Slint desktop demo application that uses the Slint GUI framework and persists data in a database-like binary file, performs a full CRUD, and displays a to-do list in GUI.


GitHub License Static Badge Static Badge


🤦 Yes, just another to-do application, but to try something new you have to start somewhere ¯\_(ツ)_/¯.

Usage

Run the application:

Install the Rust toolchain and run the following command in the root directory of the project:

cargo run

This app optionally accepts a TODO file location to load tasks from, making it easier to organize TODO tasks. The location of the .todo.dat file can be passed to both the cargo run command and the executable itself. e.g:

cargo run ~/.todo.dat # ./target/debug/rust-slint-todolist-demo ~/.todo.dat

Note

We recommend using an IDE for development, along with the LSP-based IDE integration for .slint files provided by the library itself. You can also load this project directly into Visual Studio Code and install the Slint extension.

🖼️ Screenshot

Application window showing a popup (which opens when double-clicking) of an item whose text overflows its box:

Create an app bundle (.deb file & executable binary):

Run the following command at the root of the project (it is necessary to have installed cargo bundle in the system using cargo install):

cargo bundle --release

Note

On Linux, if you install the application using the .deb file, a .todo.dat file will be generated in the user folder when you press the add TODO button. The path of said file can be established if we edit the application preferences from its launcher.

Next Steps

Hope this demo helps you get started and that you enjoy exploring creating user interfaces with Slint. For more information about the Slint Rust API and the .slint markup language, see the online documentation.

Happy coding 😀!!

About

Rust/Slint desktop demo application that uses the Slint GUI framework and persists data in a database-like binary file, performs a full CRUD, and displays a to-do list in GUI

License:GNU General Public License v3.0


Languages

Language:Slint 60.1%Language:Rust 39.9%