So now we have Olivier is going to talk about Slint.
Hello.
Yeah.
So about me, I started Open Source, working on contributing to the KD project, which is
a project made with Qt.
So that led me to be hired as my first job at Trolltech, which was a company making Qt,
later bought by Nokia.
But in 2000, so 10 years ago, I left to create my own company, Software Services.
And still I had a little, I was still a bit in the Qt ecosystem.
And I was talking with Simon Hossman, also from Qt.
And we were like the sad state of current desktop UI, can we do better?
What would happen if we would create a new UI toolkit from scratch?
And in 2020 then, we created Slint.
So this is implemented 100% almost in Rust, most of it is implemented in Rust.
It's a native toolkit, so native as opposed to runs in a browser, so it really runs natively
and it's aiming at desktop and embedded at first.
So it uses its own domain-specific language.
So it's like a macro, and you might say, wait, is this, I wanted to develop in Rust,
and now you're saying I need to learn a new language to do UI, and it's, yep, but fortunately
learning this language is not more difficult than just learning the API of any other library.
So it's just like learning an API.
And Rust is not really meant for UI, there's a lot of ways that Rust is a bit too explicit
in some cases, where for UI, you just want to describe the UI in a really more, in a
way that all languages is much better at.
And then this thing is only to describe the user interface, but all the logic, of course,
is written in a programming language, so for example, Rust, but we also have bindings
to various languages like C++ or JavaScript, and we tend to add more.
So let's try to make a short demo, I cannot do the demo because it's a lightning talk,
but I just took some screenshots.
So let's just create a new project, add Slint as a dependency, there is an extension, so
this is Visual Studio Code, where we can install an extension, we search Slint there, and one
click install.
If you don't have Visual Studio Code, it's okay, because this is just a wrapper around
a language server protocol, just an LSP, so that works with most details.
And if you don't want to use it, it's all optional.
But let's go back to main.rs and add some code.
Here we add our little macro, it shows a small window with a text and a button.
By typing that, of course I had the full power of this extension, so that includes auto-completion,
go to Symbol and everything else, we even have this little property editor there that
we added.
But the coolest thing here is that we have this code lens, a show preview, let's click
on this, it can be a collection as well on other editors, and a window up here.
So the LSP server behind the scene opens a new window, and this is the preview of what
you just typed, and if you type, it updates live.
So this is really interesting, because when you do UI, you really want to see what happens
as you do.
You don't want to spend a long time compiling and stuff.
Let's add a callback here, btn underscore clicked, and in the Rust code we will instantiate
our main window that we created from this macro, and connect to it with the generated
on btn clicked.
So this is generated by the macro, and to have some Rust code can be called.
So if we click and run the code, that's it, we have the thing.
Here we see that the two windows on the screenshot have different styles, that's because it's
styleable, so we have, for example, the front style, or we also have here a native style
because we really want to be a native toolkit, so using the native style.
Let's add a property that we can set with, now in the callback we say set count, get
count plus one, so we added this property that we use in the text.
These are reactive, meaning that when you change them, they automatically change, and
Slint knows what to refresh.
So what can we do?
So here is a little demo.
Okay.
Yeah, that works.
So this is apparently not working really good in this presentation, but the idea here that
we would see, you will see the demo running on WebAssembly in the browser.
So it's meant to be a desktop framework, but it also runs for demo on the browser.
Okay, so this doesn't look good with this projector, but again, this is a gallery which
show a few controls.
So what about the performance?
How lightweight is it?
So here I have with me this microcontroller, so this is a Raspberry Pi Pico.
It has less than three kilobytes of RAM, I said kilobyte, not megabyte.
And yes, it's working, we have scrolling, a bit some animations, so that shows what
we can do.
So the project is open source, it's entirely developed on GitHub.
We accept full requests, we also accept of course bug reports, please send GitHub issue,
open GitHub issues.
The license is GPL for open source projects, and we're also a company, so we want to make
money out of it, so that's why we have multiple licenses, so GPL for open source project.
And we also have an ambassador license, as we call it, it's a free license which you
can use for proprietary software.
You just have to say that you're using Slint, and there is also a commercial license with
support and so on.
So in the future, we plan to, after already three years of development, we are now almost
ready to release the version 1.0, so if all goes well, it should be released this month,
end of February.
And the other thing we're working on is to improve our little preview there and to make
it that you could drag and drop things, drag and drop widgets, and have actually a design
tool where, so even designer could do the design without even touching the Slint language.
So that's our hope for the future.
So that's the end of my presentation, I hope that you got, that it made you want to try
Slint, and please do contact me if you have any questions or if you're wondering if you
can use Slint, I'll be around, but please ask questions.