1
0
Fork 0
mirror of synced 2024-05-19 20:02:24 +12:00
This commit is contained in:
Rafał Mikrut 2023-11-17 22:44:38 +01:00
parent 87d8f90280
commit b700c010f2

View file

@ -127,13 +127,13 @@ SLINT_STYLE=material-dark cargo run -- --path .
There are multiple reasons why I decided to use Slint as toolkit for Krokiet over other toolkits.
| Toolkit | Pros | Cons |
|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Gtk 4 | - Hard compilation/cross compilation and bundling all required libraries - mostly on windows </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 |
| Qt | - QML support - simplify creating of gui from code it is easy to use and powerful </br> - Very flexible framework <br/> - Typescript/javascript <=> qml interoperability </br> - Probably the most mature GUI library | - New and limited qt bindings <br/> - Big cross compilation problems and hard to setup on non windows platforms <br/> - Very easy to create and use invalid state in QML(unexpected null/undefined values etc.) <br/> - Commercial license or GPL |
| Slint | - Internal language is compiled to native code <br/> - Live gui preview with Vscode/Vscodium without needing to use rust <br/> - Full rust solution - easy to compile/cross compile, minimal runtime requirements | - Internal .slint language is more limited than QML(javascript flexibility is big pl) <br/> - Out of bounds and similar errors are quietly being corrected instead printing error - this can lead to hard to debug problems <br/> - Commercial license or GPL(is available also different ) |
| Iced | - ~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) and this is also </br> - Docs are almost non-existent |
| Tauri | - Easy to create ui(at least for web developers) - uses html/css/js</br>- Quite portable | - Webview dependency - it is not really lightweight and can be hard to compile on some platforms</br>- Cannot select directory - file chooser only can choose files - small thing but important for me</br>- Not very performant Rust <=> Javascript communication |
| Toolkit | Pros | Cons |
|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Gtk 4 | - Hard compilation/cross compilation and bundling all required libraries - mostly on windows </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 |
| Qt | - QML support - simplify creating of gui from code it is easy to use and powerful </br> - Very flexible framework <br/> - Typescript/javascript <=> qml interoperability </br> - Probably the most mature GUI library | - New and limited qt bindings <br/> - Big cross compilation problems and hard to setup on non windows platforms <br/> - Very easy to create and use invalid state in QML(unexpected null/undefined values etc.) <br/> - Commercial license or GPL |
| Slint | - Internal language is compiled to native code <br/> - Live gui preview with Vscode/Vscodium without needing to use rust <br/> - Full rust solution - easy to compile/cross compile, minimal runtime requirements | - Internal .slint language is more limited than QML(javascript flexibility is big pl) <br/> - Out of bounds and similar errors are quietly being corrected instead printing error - this can lead to hard to debug problems <br/> - Commercial license or GPL(is available also different <br/> Popup windows almost not exists <br/> Internal widgets are almost not customizable and usually quite limited ) |
| Iced | - ~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) and this is also </br> - Docs are almost non-existent |
| Tauri | - Easy to create ui(at least for web developers) - uses html/css/js</br>- Quite portable | - Webview dependency - it is not really lightweight and can be hard to compile on some platforms</br>- Cannot select directory - file chooser only can choose files - small thing but important for me</br>- Not very performant Rust <=> Javascript communication |
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