Krokiet is new Czkawka frontend written in Slint, which uses Rust in opposite to Gtk 4 frontend which uses mostly C code.
Different toolkit means different look, limitations and features, so you should not expect same features like in Gtk 4 frontend(but of course I want implement most of the features from other project).
Krokiet should not have any special runtime requirements - it should work on almost any device non-antic device.
Prebuild binaries should work on Windows 10,11, Mac, Ubuntu 22.04/20.04 and similar(libheif version and czkawka_gui requires Ubuntu 22.04+, rest Ubuntu 20.04) - https://github.com/qarmin/czkawka/releases/
On Ubuntu you need to install this dependencies:
sudo apt install libfontconfig-dev libfreetype-dev
Default compilation is done by
cargo build --release and should work on most systems.
Currently rustc have problems in optimizing code generated by slint(~90000 lines of code with version 7.0.0), so default
release build usually take > 60 minutes.
As workaround you can use this command, which require nightly version of rust:
RUSTFLAGS="-Zmir-enable-passes=-ScalarReplacementOfAggregates" cargo +nightly build --release
The only exception is building skia renderer which is non default feature that can be enabled manually if you want to use it, that require on windows msvc compiler(not sure how to exactly install it).
Also skia renderer is written in C++ and uses on platforms like x86_64 and arm64 prebuild binaries, so if you are using different architecture, this library will be build from source, which can take a lot of time and require additional dependencies.
By default, only femtovg(opengl) and software renderer are enabled, but you can enable more renderers by compiling app with additional features.
Most of the users will want to use app with windowing system/compositor, so features starting with
winit in name are
cargo build --release --features "winit_skia_opengl"
cargo build --release --features "winit_software"
to run app with different renderers you need to use it, by adding
SLINT_BACKEND=skia ./target/release/krokiet # This uses now opengl - https://github.com/slint-ui/slint/discussions/3799
when you will use invalid/non-existing backend, app will show warning
slint winit: unrecognized renderer skia, falling back to FemtoVG
to check what is really used, add
SLINT_DEBUG_PERFORMANCE=refresh_lazy,console,overlay cargo run
should print something like
Slint: Build config: debug; Backend: software
App was created with dark fluent theme in mind, but is possible to use light theme by setting
fluent-light during compilation e.g.
SLINT_STYLE=fluent-light cargo run -- --path .
Slint supports also other themes, but they are not officially supported by this app and may be broken(but looks that cupertino looks quite good with current style).
SLINT_STYLE=cupertino-light cargo run -- --path .
SLINT_STYLE=cupertino-dark cargo run -- --path .
SLINT_STYLE=material-light cargo run -- --path .
SLINT_STYLE=material-dark cargo run -- --path .
There are multiple reasons why I decided to use Slint as toolkit for Krokiet over other toolkits.
|- Good Linux support </br> - Cambalache can be used to create graphically gui </br> - Good gtk4-rs bindings(but sometimes not really intuitive)
|- Hard compilation/cross compilation and bundling all required libraries - mostly on windows </br> - Forcing the use of a specific gui creation style </br> - Strange crashes, not working basic features, etc.(again, mostly on windows) </br> - Forcing to use bugged/outdated but dynamically loaded version of libraries on linux (e.g. 4.6 on Ubuntu 22.04) - not all fixes are backported
|- QML support - simplify creating of gui from code it is easy to use and powerful </br> - Very flexible framework
|- New and limited qt bindings
- Hard to cross-compile
- Very easy to create and use invalid state in QML(unexpected null/undefined values, messed properties bindings etc.)
- Commercial license or GPL
|- Internal language is compiled to native code
- Live gui preview with Vscode/Vscodium without needing to use rust
- Full rust solution - easy to compile/cross compile, minimal runtime requirements </br> - Static type checks in slint files
|- Internal .slint language is more limited than QML
- Out of bounds and similar errors are quietly being corrected instead printing error - this can lead to hard to debug problems
- Only GPL is only available open-source license
- Popup windows almost not exists
- Internal widgets are almost not customizable and usually quite limited </br> - Creating big/good looking with custom widgets gui is very hard
|- ~100% rust code - so compilation is simple </br> - Elm architecture - simple to understand
|- Mostly maintained by one person - slows down fixing bugs and implementing new features </br> - GUI can be created only from rust code, which really is bad for creating complex GUIs(mostly due rust compile times) </br> - Docs are almost non-existent
|- Easy to create ui(at least for web developers) - uses html/css/js</br>- Quite portable
Since I don’t have time to create really complex and good looking GUI, I needed a helper tool to create GUI not from Rust(I don’t want to use different language, because this will make communication with czkawka_core harder) so I decided to not look at Iced which only allows to create GUI from Rust.
GTK and QT also I throw away due cross compilation problems caused mostly by using C/C++ internally. Using GTK in Czkawka was a reason why I started to find other toolkits.
So only Slint left with its cons and pros.
Code is licensed under MIT license but entire project is licensed under GPL-3.0 license, due Slint license restrictions.
Why Krokiet(eng. Croquette)?
Because I like croquettes(Polish version), the ones with meat, mushrooms wrapped in breadcrumbs… it makes my mouth water.
I considered also other dishes which I like to eat like pierogi, żurek, pączek, schabowy or zapiekanka.
This name should be a lot of easier to remember than czkawka or szyszka.