Тёмный

Simple GUI application with Slint and Rust 

Slint
Подписаться 1,1 тыс.
Просмотров 27 тыс.
50% 1

Live coding to create a small simple GUI application with Rust and the Slint toolkit (slint.rs)

Наука

Опубликовано:

 

19 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 36   
@morgomi
@morgomi Год назад
This looks really cool, I learned EGUI (Rust), and it will be my next learning step. Doesnt seems as intimidating as other GUI libraries. Thank you for your contributions!
@augustinvangeebergen3098
@augustinvangeebergen3098 Год назад
Here trying to build some app in rust with basically no knowledge, but some huge motivation, and you published this video 5 days ago :O Thanks
@DerEingefrorene
@DerEingefrorene Год назад
I'm really impressed by Slint and I've already started using it for small projects. But what I find lacking with those minimal examples is that I still don't have any clue on how to do a bigger project with it. You see, Rust is not a classical OOP language, but Slint is an OOP framwork. So splittings things up in different files/modules/objects seems natural. But this doesn't work in Rust in the same way! There even is an example for C++ where a Slint-Komponent is subclassed to extend its functionality like you would expect it. But how do you structure your project with Rust where you can't do that? And yet, most examples are done in one single file... A tutorial for project achitectures with Slint would be really nice, since this is the part where I struggle the most. For example, you don't have this problem for GUI frameworks like relm or iced, since their concept fits nicely into Rust. But Slint doesn't so much. (Like GTK which implemented a whole polymorphism system for C to make it OOP... Which is insane of course)
@Slint-UI
@Slint-UI Год назад
For an example that has several rust files, you can have a look at github.com/slint-ui/cargo-ui
@TechLord79
@TechLord79 5 месяцев назад
You should note that today GUI stuff can be (and should be) put to separate files which makes stuff easier and better separated, there's a great template for that. What I like about Slint is that it feels like a jsonesque sibling to XAML. We need such a thought-out declarative responsive framework. There are some brilliant simple things like "forward-focus". But I guess to really shine on the desktop for certain LOBs the existing modal/multi-modal/window issues need to get sorted out first.
@AlleTheMaster
@AlleTheMaster 6 месяцев назад
Am I the only one who is bothered by the order or the buttons (798 instead of 789)? Like, why would you do that? 😂
@Slint-UI
@Slint-UI 6 месяцев назад
well spotted. This is just a typo
@muhammadadribmahmud5012
@muhammadadribmahmud5012 Год назад
Great Job!
@richardboreiko
@richardboreiko 3 месяца назад
This was a little hard to follow, but I got through it. Three things, though: changing text size and color. My button text is white, which is barely visible against the yellow background. Also, the text is very small so I'd like to make the font size a more readable size. And I'd like so specify the initial window size and change the window title.
@antonjensen9996
@antonjensen9996 5 месяцев назад
loving the french accent!
@jamesmoynihan948
@jamesmoynihan948 3 месяца назад
Interesting kit! I like the idea to make the design language similar to HTML/CSS. I'm guessing there are some places that are ripe for abstraction and DX improvements (e.g. a derive macro for making that Rc (or Arc) to keep the memory allocation for persistent/global state). Likewise, I'd love to see more about how to extend or compose the components and structure the codebase. I'm wondering how concise this would be in a more complex app. Anyone have an example I can look at?
@happynosis1651
@happynosis1651 Год назад
This looks very nice! Only the hoops you have to jump through to get app in the closure are insane. Can that not be done transparently (by passing a usable app to the closure, or a macro?) And why are the programming parts not as Rusty as they can be (e.g. pub fn?) I do like that you brought back ?: though.
@Slint-UI
@Slint-UI Год назад
You're right that this part is not ideal and we'd like to find a solution: See github.com/slint-ui/slint/issues/1714 for some discussion. I'm not sure I understand what you mean by parts not being Rusty, could you elaborate?
@johanmilterjakobsen1627
@johanmilterjakobsen1627 3 месяца назад
Can you make a video explaining how to combine multiple .slint files? Maybe also showing how to dynamically create components using rust, and appending them to the gui?
@jeromebousquie3379
@jeromebousquie3379 5 месяцев назад
Excellent 😀 Super bien expliqué et pédagogique. Et ça donne une idée rapide de la puissance du framework. quick bug fix : l92 : state.current_value = result; l93: //state.prev_value = result; Vraiment chouette boulot. Je suis preneur d'autres tutos de ce format ;-)
@geocine
@geocine 9 месяцев назад
How to compile app into 1 single binary, is that possible?
@ricardorochadev
@ricardorochadev 6 месяцев назад
Como se diz aqui no Brasil, o cara pintou e bordou
@afiqzx
@afiqzx Год назад
Why slint lsp dont have autocompletion in macro like shown in this video? Is there any setting I missed? Edit: the autocomplete will trigger once you written the macro until you write 'inherits'
@Slint-UI
@Slint-UI Год назад
What editor are you using and what are you really trying to auto-complete? If you think there is a bug, please fill an issue on github.
@afiqzx
@afiqzx Год назад
@@Slint-UI slint lsp won't auto-complete the keyword `export component`. This is reproducible for vscode and neovim. I'll file an issue later as I'm working right now.
@mohanasundarampalanisamy8494
Thanks for lovely - tutorial. Need Documentation for handling video buffer in slint. Can you help me with that?
@Slint-UI
@Slint-UI Год назад
Can you elaborate on what you mean with "video buffer"? I'd also like to suggest to move across to github.com/slint-ui/slint/discussions - then your question gets more visibility :)
@psclip3309
@psclip3309 10 месяцев назад
So very confused about whether to choose flutter or slint, I know rust is very good at multi general purpose, and dart not so much, are you guys focusing on being a direct alternative to flutter?, I want to use a tech stack that has good performance and also a lot of customization options. I want to work with animation
@eldonad
@eldonad 8 месяцев назад
This is still early development, so if you want a somewhat more polished development experience, you should probably seek Flutter. Also Rust is not a simple language to learn contrary to Flutter.
@dorktales254
@dorktales254 2 месяца назад
Wouldn't it be better to have the slint preview displayed inline in vscode?
@TheCreoleBlanc
@TheCreoleBlanc 4 месяца назад
Thank
@KushLemon
@KushLemon Месяц назад
At this point, might as well use a standard like React with Tauri.
@psclip3309
@psclip3309 10 месяцев назад
Do you have any plans to make slint work on mobile devices, android or ios?
@Slint-UI
@Slint-UI 10 месяцев назад
Yes, we have plans to make slint work on mobile device: github.com/slint-ui/slint/issues/46 and github.com/slint-ui/slint/issues/47 We Will start with android and iOS will follow.
@super_man1350
@super_man1350 Год назад
I got this error when running slint: error[E0433]: failed to resolve: use of undeclared crate or module in visual studio code
@eldonad
@eldonad 8 месяцев назад
Did you cargo add slint in your project folder beforehand ?
@Libredu
@Libredu 6 месяцев назад
It is almost not rust but with rust.
@pedroluzio
@pedroluzio 6 месяцев назад
Most likely the API has changed and set_value looks like is no longer recognized.
@Slint-UI
@Slint-UI 6 месяцев назад
The API hasn't changed. set_value is there because there is a `in property` called value declared in the slint! macro. You probably want to double check your code to check if that property is still there.
@stuartbiggs1278
@stuartbiggs1278 6 месяцев назад
you need to people that to get this to work that people will need qt installed
@Slint-UI
@Slint-UI 6 месяцев назад
Qt installation is optional .. refer to docs here -- slint.dev/releases/1.3.2/docs/slint/src/advanced/backends_and_renderers ..
Далее
Why You SHOULD Learn Rust
28:56
Просмотров 35 тыс.
Parents' Breakfast Rescue Mission for Laptops
00:28
you need to build a RUST desktop app!!
27:21
Просмотров 291 тыс.
iced GUI | Rust Language
17:00
Просмотров 3,9 тыс.
Makepad: How to use Rust for fast UI - Rik Arends
43:36
UI Libraries Are Dying, Here's Why
13:28
Просмотров 283 тыс.
Build A Rust Frontend (Really FAST Web Apps with Yew)
7:28
I spent six months rewriting everything in Rust
15:11
Просмотров 415 тыс.
Safe Rust AIN'T SAFE!? (cve-rs)
20:42
Просмотров 49 тыс.
Why You Shouldn’t Build Your Next App in Rust
9:18
why rust libraries may never exist.
7:26
Просмотров 232 тыс.
Собери ПК и Получи 10,000₽
1:00
Просмотров 2,7 млн
Красиво, но телефон жаль
0:32
Просмотров 1,2 млн