[00:00.000 --> 00:09.520] So now we have Olivier is going to talk about Slint. [00:09.520 --> 00:10.520] Hello. [00:10.520 --> 00:11.520] Yeah. [00:11.520 --> 00:18.960] So about me, I started Open Source, working on contributing to the KD project, which is [00:18.960 --> 00:20.760] a project made with Qt. [00:20.760 --> 00:25.160] So that led me to be hired as my first job at Trolltech, which was a company making Qt, [00:25.160 --> 00:27.520] later bought by Nokia. [00:27.520 --> 00:33.400] But in 2000, so 10 years ago, I left to create my own company, Software Services. [00:33.400 --> 00:38.360] And still I had a little, I was still a bit in the Qt ecosystem. [00:38.360 --> 00:41.280] And I was talking with Simon Hossman, also from Qt. [00:41.280 --> 00:47.640] And we were like the sad state of current desktop UI, can we do better? [00:47.640 --> 00:51.720] What would happen if we would create a new UI toolkit from scratch? [00:51.720 --> 00:55.520] And in 2020 then, we created Slint. [00:55.520 --> 01:05.440] So this is implemented 100% almost in Rust, most of it is implemented in Rust. [01:05.440 --> 01:11.640] It's a native toolkit, so native as opposed to runs in a browser, so it really runs natively [01:11.640 --> 01:20.480] and it's aiming at desktop and embedded at first. [01:20.480 --> 01:26.440] So it uses its own domain-specific language. [01:26.440 --> 01:34.760] So it's like a macro, and you might say, wait, is this, I wanted to develop in Rust, [01:34.760 --> 01:41.320] and now you're saying I need to learn a new language to do UI, and it's, yep, but fortunately [01:41.320 --> 01:47.680] learning this language is not more difficult than just learning the API of any other library. [01:47.680 --> 01:50.920] So it's just like learning an API. [01:50.920 --> 01:55.960] And Rust is not really meant for UI, there's a lot of ways that Rust is a bit too explicit [01:55.960 --> 02:03.280] in some cases, where for UI, you just want to describe the UI in a really more, in a [02:03.280 --> 02:07.960] way that all languages is much better at. [02:07.960 --> 02:12.960] And then this thing is only to describe the user interface, but all the logic, of course, [02:12.960 --> 02:17.600] is written in a programming language, so for example, Rust, but we also have bindings [02:17.600 --> 02:25.560] to various languages like C++ or JavaScript, and we tend to add more. [02:25.560 --> 02:30.720] So let's try to make a short demo, I cannot do the demo because it's a lightning talk, [02:30.720 --> 02:33.040] but I just took some screenshots. [02:33.040 --> 02:39.880] So let's just create a new project, add Slint as a dependency, there is an extension, so [02:39.880 --> 02:45.440] this is Visual Studio Code, where we can install an extension, we search Slint there, and one [02:45.440 --> 02:46.440] click install. [02:46.440 --> 02:50.120] If you don't have Visual Studio Code, it's okay, because this is just a wrapper around [02:50.120 --> 02:57.440] a language server protocol, just an LSP, so that works with most details. [02:57.440 --> 03:01.400] And if you don't want to use it, it's all optional. [03:01.400 --> 03:06.280] But let's go back to main.rs and add some code. [03:06.280 --> 03:11.720] Here we add our little macro, it shows a small window with a text and a button. [03:11.720 --> 03:18.480] By typing that, of course I had the full power of this extension, so that includes auto-completion, [03:18.480 --> 03:24.640] go to Symbol and everything else, we even have this little property editor there that [03:24.640 --> 03:27.480] we added. [03:27.480 --> 03:33.480] But the coolest thing here is that we have this code lens, a show preview, let's click [03:33.480 --> 03:40.280] on this, it can be a collection as well on other editors, and a window up here. [03:40.280 --> 03:46.400] So the LSP server behind the scene opens a new window, and this is the preview of what [03:46.400 --> 03:49.240] you just typed, and if you type, it updates live. [03:49.240 --> 03:55.240] So this is really interesting, because when you do UI, you really want to see what happens [03:55.240 --> 03:56.240] as you do. [03:56.240 --> 03:59.760] You don't want to spend a long time compiling and stuff. [03:59.760 --> 04:06.360] Let's add a callback here, btn underscore clicked, and in the Rust code we will instantiate [04:06.360 --> 04:14.680] our main window that we created from this macro, and connect to it with the generated [04:14.680 --> 04:15.800] on btn clicked. [04:15.800 --> 04:20.840] So this is generated by the macro, and to have some Rust code can be called. [04:20.840 --> 04:28.960] So if we click and run the code, that's it, we have the thing. [04:28.960 --> 04:34.920] Here we see that the two windows on the screenshot have different styles, that's because it's [04:34.920 --> 04:39.600] styleable, so we have, for example, the front style, or we also have here a native style [04:39.600 --> 04:49.320] because we really want to be a native toolkit, so using the native style. [04:49.320 --> 04:55.960] Let's add a property that we can set with, now in the callback we say set count, get [04:55.960 --> 05:01.600] count plus one, so we added this property that we use in the text. [05:01.600 --> 05:10.000] These are reactive, meaning that when you change them, they automatically change, and [05:10.000 --> 05:19.000] Slint knows what to refresh. [05:19.000 --> 05:20.160] So what can we do? [05:20.160 --> 05:23.040] So here is a little demo. [05:23.040 --> 05:24.040] Okay. [05:24.040 --> 05:26.680] Yeah, that works. [05:26.680 --> 05:34.200] So this is apparently not working really good in this presentation, but the idea here that [05:34.200 --> 05:39.720] we would see, you will see the demo running on WebAssembly in the browser. [05:39.720 --> 05:48.000] So it's meant to be a desktop framework, but it also runs for demo on the browser. [05:48.000 --> 05:56.840] Okay, so this doesn't look good with this projector, but again, this is a gallery which [05:56.840 --> 06:00.680] show a few controls. [06:00.680 --> 06:01.680] So what about the performance? [06:01.680 --> 06:02.840] How lightweight is it? [06:02.840 --> 06:13.480] So here I have with me this microcontroller, so this is a Raspberry Pi Pico. [06:13.480 --> 06:22.760] It has less than three kilobytes of RAM, I said kilobyte, not megabyte. [06:22.760 --> 06:28.680] And yes, it's working, we have scrolling, a bit some animations, so that shows what [06:28.680 --> 06:35.640] we can do. [06:35.640 --> 06:40.400] So the project is open source, it's entirely developed on GitHub. [06:40.400 --> 06:48.040] We accept full requests, we also accept of course bug reports, please send GitHub issue, [06:48.040 --> 06:50.280] open GitHub issues. [06:50.280 --> 06:55.320] The license is GPL for open source projects, and we're also a company, so we want to make [06:55.320 --> 07:00.600] money out of it, so that's why we have multiple licenses, so GPL for open source project. [07:00.600 --> 07:05.720] And we also have an ambassador license, as we call it, it's a free license which you [07:05.720 --> 07:09.640] can use for proprietary software. [07:09.640 --> 07:15.120] You just have to say that you're using Slint, and there is also a commercial license with [07:15.120 --> 07:20.760] support and so on. [07:20.760 --> 07:25.160] So in the future, we plan to, after already three years of development, we are now almost [07:25.160 --> 07:31.000] ready to release the version 1.0, so if all goes well, it should be released this month, [07:31.000 --> 07:33.880] end of February. [07:33.880 --> 07:37.880] And the other thing we're working on is to improve our little preview there and to make [07:37.880 --> 07:43.720] it that you could drag and drop things, drag and drop widgets, and have actually a design [07:43.720 --> 07:53.440] tool where, so even designer could do the design without even touching the Slint language. [07:53.440 --> 07:59.520] So that's our hope for the future. [07:59.520 --> 08:05.840] So that's the end of my presentation, I hope that you got, that it made you want to try [08:05.840 --> 08:12.920] Slint, and please do contact me if you have any questions or if you're wondering if you [08:12.920 --> 08:38.960] can use Slint, I'll be around, but please ask questions.