Simple GUI application with Slint and Rust

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

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!

morgomi
Автор

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)

DerEingefrorene
Автор

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

augustinvangeebergen
Автор

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.

TechLord
Автор

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.

richardboreiko
Автор

Am I the only one who is bothered by the order or the buttons (798 instead of 789)? Like, why would you do that? 😂

AlleTheMaster
Автор

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'

afiqzx
Автор

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?

johanmilterjakobsen
Автор

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?

jamesmoynihan
Автор

Thanks for lovely - tutorial. Need Documentation for handling video buffer in slint. Can you help me with that?

mohanasundarampalanisamy
Автор

How did you get the properties in the botton left?

yesyesman
Автор

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 ;-)

jeromebousquie
Автор

Wouldn't it be better to have the slint preview displayed inline in vscode?

dorktales
Автор

Como se diz aqui no Brasil, o cara pintou e bordou

ricardorochadev
Автор

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

psclip
Автор

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.

happynosis
Автор

How to compile app into 1 single binary, is that possible?

geocine
Автор

Do you have any plans to make slint work on mobile devices, android or ios?

psclip
Автор

I got this error when running slint: error[E0433]: failed to resolve: use of undeclared crate or module in visual studio code

super_man
Автор

Most likely the API has changed and set_value looks like is no longer recognized.

pedroluzio