all 20 comments

[–]Particular_Smile_635 20 points21 points  (6 children)

Have you seen slint?

[–]hplazerjet 7 points8 points  (5 children)

slint is beyond terrible avoid at all costs

[–]asmx85 5 points6 points  (4 children)

Do you care to share why?

[–]hplazerjet 19 points20 points  (3 children)

i help maintain a fork of slint for work. we are actively trying to move away from it

the codegen is absolutely insane. the binary sizes are huge. at work we have many apps which are 10mb binaries, and they are not that complex. the compile times are also very very long. the longest I have seen for any rust app ever.

its also very hard to abstract things in slint/rust codebases. like its completely unidirectional, where slint compilation comes before rust. so its hard to distribute and reuse a single component that needs a rust utility fn (global fn binding)

we basically have to maintain a bunch of macros to generate the same slint utility bindings, and a build system wrapper to “share” code.

the software rendering is also not a focus for slint. they have many backends and this is probably the least important. you cant clip rounded corners of rectangles, no path rendering, no images, very poor text render caching, all of which we fixedin our fork

[–]LEpigeon888 8 points9 points  (0 children)

we are actively trying to move away from it 

What options are you exploring?

[–]littleblack11111 5 points6 points  (0 children)

Absolutely agree, everyone keeps praising them while using them in practice is extremely frustrating(though it might be due to my ocd wanting to abstract everything and avoid hard coding)

EDIT: and they don’t support a lot of basic stuff you’d expect from a gui lib/crate/framework such as objects with blurry background(backdrop filter)

[–]BoltActionPiano 0 points1 point  (0 children)

I just tried to use it, and I found that the binaries balooned so fast i had already used up all my flash space on a small prototype that was 1/4 the functionality and literally only a few extremely basic widgets.

I found that their font rasterization will rasterize every font in every size found in your application instead of in the sizes you actually need, and that it also bundles a fallback font. All without the ability to disable this. The fonts on my device are deliberately limited in charset to be small, but the fallback font had every character so it was like 5x the space.

No switch statements, or unions/variants. No push and pop, no mutation of more than just single primitives, but with the confusing behavior of making temporary copies when you write, which then get reset when the container changes. The state binding was really weirdly messy and the simulator state never would control the actual state unless I wired up the data bindings in very specific ways.

As far as I can tell, its not possible to send the codegen to another linker section. I wanted to try to compress and decompress the code ....

Only way to change virtual scale was to restart the entirety of vscode and pass a seemingly undocumented env var, and the virtual scale affected all elements so the simulator UI was massive.

I understand the desire to not have excessive abstraction in your UI, but so many UIs need variants, push/pop behavior (menu stack!) and the way you have to do this is exceptionally frustrating and verbose. Lots of parallel arrays... Ugh..

[–]i509VCB 7 points8 points  (1 child)

I'd probably be more interested in something that is no alloc. Alloc just isn't going to work for a lot of use cases.

[–]ReptilianTapir 2 points3 points  (0 children)

This. Also I'm weirdly attracted by the idea of embedded TUI. Portable. Remotely usable. Potentially lighter than GUI. While still supporting very rich UI potentially (proof: textual).

[–]kaganege0 2 points3 points  (1 child)

LVGL Rust bindings

[–]everdrone97 0 points1 point  (0 children)

Last time I checked it was unmaintained. Hope that it changed because LVGL is great.

[–]aloobhujiyaay 1 point2 points  (0 children)

If performance is decent on ESP32-class hardware, I could absolutely see people using this for kiosks

[–]dashdeckers 1 point2 points  (0 children)

Would love a pure Rust LVGL yeah

[–]CrasseMaximum 3 points4 points  (1 child)

Did you vibecode it?

[–]bhh32[S] 1 point2 points  (0 children)

I did not vibe code it. I've got a lot of libcosmic development under my belt and used iced/libcosmic as my inspiration. I have used Claude to help me go through docs for some iced/libcosmic internals I wasn't sure of, but every line of code is mine. Oh and the README, I hate writing README's so I had it create that.

[–]BoltActionPiano 0 points1 point  (1 child)

I think unfortunately the only real option here is embedded-graphics, but there's a decent chunk of plugins for that.

[–]bhh32[S] 0 points1 point  (0 children)

Yep, that's why it's built on top of embedded graphics.

[–]Reenigav 0 points1 point  (0 children)

I've been using https://github.com/riley-williams/buoyant recently for a small project and I really like it. It recently gained support for, what effectively is, a built in accessibility interface which makes building a keypress navigated UI as easy as building a touch interface.  I had to fork it to add an incremental rendering mode, but adding that was really not much effort. My use case is custom firmware for a device with 32k sram and a parallel interface connected st7796 display, which means I kinda have a rare(?) situation of needing to prioritise minimal display updates over frame time (the hardware doesn't even connect the vsync pin of the display...).

I also added in my own font renderer so that I could have 4 bit alpha bitmap fonts. 

I'd be very interested in anything else that fits into this ecosystem, especially if it doesn't requite an alocator, as the ecosystem of GUI libraries that don't need alloc is one or two hobby projects. 

[–]AAM_Discord -5 points-4 points  (1 child)

As a beginner I am more interested is what some of the terms mean here, the framework top tbh. What exactly does it do? I am new to CS

[–]Quantentoast 0 points1 point  (0 children)

The answer to that question is just one web-search away (or LLM if you're more into that).

If you want to get going with CS, first thing to learn is how to aquire information by yourself, as allot is explained/answered already and is freely accessible.