rusl aims to be a slim frontend for file and content search with the heavy lifting done by ripgrep and other libraries. This project started out to evaluate the maturity of some GUI frameworks in rust. See further down for comments on the GUIs.
Each GUI Can be found in its own folder. To compile, cd into the folder, and cargo build.
Druid is currently the most feature complete and releases are Druid.
To enable pdf/word/excel
searching, tick the extended
box in settings. Currently this reads entire document to memory, so may not be suitable for large documents. Has a big impact on search time, so disabled by default.
Why the name rusl? Well, it's the sound made when you are searching through leaves or papers for something. Also it's 75% of the letters in rust!
This project relies heavily on ripgrep and BurntSushi's libraries.
Shout out to BurntSushi for the awesome work (https://github.com/BurntSushi)
git clone https://github.com/griccardos/rusl
cd rusl
cd druid
(or into other guis)cargo build --release
cd target/release
./rusl
Linux/Druid requires gtk+3; see GTK installation page . (On ubuntu-based distro, run sudo apt-get install libgtk-3-dev )
Contributions are welcome. You are also welcome to add a new GUI frontend in a new branch.
Each library is on a different branch. Change branch to select different UI.
Druid | Slint | EGUI | ICED | Dioxus | |
---|---|---|---|---|---|
Dependencies | 171 | 439 | 243 | 312 | 337 |
Build time cold (s) | 18 | 40 | 16 | 42 | 56 |
Lines | 403 | 479 | 229 | 198 | 236 |
File size windows (kb) | 4739 | 6926 | 7071 | 10276 | 7026 |
Druid | Slint | EGUI | ICED | Dioxus | |
---|---|---|---|---|---|
- Toolbar icon | ✓ | ✓ | ✓ | ✓ | ✓ |
- Window icon | ✓ | ✓ | ✓ | ✓ | ✓ |
- Tab between fields | ✓ | ✓ | ✓ | ✓(manual impl) | ✓ |
- paste into textbox | ✓ | ✓ | ✓ | ✓ | ✓ |
Druid | Slint | EGUI | ICED | Dioxus | |
---|---|---|---|---|---|
- Filename search | ✓ | ✓ | ✓ | ✓ | ✓ |
- Content search | ✓ | ✓ | ✓ | ✓ | ✓ |
- Match Highlighting | ✓ | ✗ | ✗ | ✗ | ✗ |
- Settings | ✓ | ✓ | ✓ | ✓ | ✗ |
- Copy to clipboard | ✓ | ✓ | ✓ | ✗ | ✗ |
- Windows | ✓ | ✓ | ✓ | ✓ | ✓ |
- Linux | ✓ | ✓ | ✓ | ✓ | |
- Mac | ✓*1 | ✓ | ✓ | ✓ |
This project started off using Slint (https://slint-ui.com/). It was really easy to get up and running and within 2 days had something relatively complete (with a few concessions made). There were so many good things about the way it worked, and the easy of setting it up. Easy concepts such as events, callbacks, and communication between GUI and backend, made it very simple and straightforward to use.
Unfortunately when I tried compiling for Linux, I realised that some of the functionality did not work on Linux. Will keep an eye on this one.
Having never used react or something similar, I struggled a bit with hooks. However after a bit of time, and as the documentation became better, was able to get a solution
working. Needed to use async and use_coroutine
to run in the background and check for results. Other than that it was easy to set up user interface if you are familiar with front end web development.
rsx!
- would like to see formatter here(https://github.com/linebender/druid) Next up was Druid. I have used it in a personal project previously, and feel like it has a lot of potential. First off, it is a little more complicated than Slint, and there are additional things to learn like Data, Lens etc. There is some boilerplate to set up a custom widget.
However it feels like one can do almost everything they need, and if there is no existing widget, it gives us the tools to build our own widgets. I really like the feel of this. My favourite in terms of professional look and feel.
(https://github.com/emilk/egui) This one is a real gem, so easy to use and setup. It is an immediate mode GUI, which means it gets repainted many times per second. It only took a few hours and had most of the functionality. A lot less fighting with the borrow checker here, and still had mut references to self for all the modification and lookup to the app state that was required. My favourite in terms of getting something up and running fast with almost all functionality.
(https://github.com/iced-rs/iced) Nice library using Elm framework. Easy to get up and running. Uses winit for window, so one can set the icon for window itself in Windows