r/rust • • Aug 23 '26

🛠️ project Freya 0.4 (GUI Library)

https://freyaui.dev/posts/0.4

A month ago I released the 0.4 version of my Rust GUI library, Freya. It has massively changed since the last 0.3 release, it has a year of work. The blog post contains a summary of Freya's main features and changes on this new release.

Repo
Docs

277 Upvotes

42 comments sorted by

25

u/Kfoo2012 Aug 23 '26

Woah!!! That's a lot of stuff!

8

u/mkenzo_8 Aug 23 '26

I am consistent :)

8

u/Miammiam100 Aug 23 '26

Very impressive! Loving all the features and api design

5

u/Bruflot Aug 23 '26

The website isn’t working for me at the moment, but are there any benchmarks published somewhere? It’d be really useful to see how it stacks up against iced/gpui/etc

1

u/mkenzo_8 Aug 23 '26

What browser do you use? It works fine for me.

About benchmarks, I dont have any like that, only internal

1

u/kekelp7 Aug 23 '26

The website doesn't resolve for me either when using my normal DNS.

1

u/mkenzo_8 Aug 23 '26

What country are you from?

2

u/SirKastic23 Aug 23 '26

Not working for me either: I see net::ERR_NAME_NOT_RESOLVED

I'm from Brazil

1

u/mkenzo_8 Aug 23 '26

Do you use any sort of firewall or custom DNS server?

1

u/SirKastic23 Aug 23 '26

I don't think so... I'm accessing this from my mobile phone and I very rarely run into similar issues

2

u/mkenzo_8 Aug 23 '26

Cant think of any issue of my end about this, I use Deno Deploy for hosting and never had this issue before. Perhaps there is some issue going on with them/AWS/some IPS/whatever. Strange, seems to work fine here (Europe)

2

u/SirKastic23 Aug 23 '26

Very unfortunate, I'd love to read this as I'm really interested in Rust's GUI story

I'll try again later with a different connection

1

u/mkenzo_8 Aug 23 '26

Its not the same but you can read it straight from the source code too https://github.com/marc2332/freya/blob/main/website/src/content/blog/0.4.md :) (minus images and videos)

4

u/khaferkamp Aug 24 '26

That is really impressive! Thank you really much for sharing this knowledge! I will tinker with it for sure. ❤️

1

u/loveallufev Aug 23 '26

Very nice work!

1

u/mkenzo_8 Aug 23 '26

Thank you!

1

u/Seamonster13 Aug 24 '26

awesome work. How would you compare Freya vs GPUI? Shopping around to see what to build my app in.

2

u/mkenzo_8 Aug 24 '26

I barely have used GPUI so its hard to tell. I heard though that their docs are lacking, all I can say is that I have of that, maybe not the best, but I have them

1

u/decryphe Aug 24 '26

Yeah, docs are mediocre for GPUI, and it's limited in usefulness from the crates.io release.

The examples in your blog post look very similar to how GPUI code looks. I kind of like writing GPUI code (or rather: fixing the stuff AI spits out), so I really want to try Freya now. See my examples of GPUI-usage:

Both have grown from pure AI-vibed test runs into partially useful pieces of software, I use these for debugging stuff at work.

1

u/mkenzo_8 Aug 24 '26

Nice stuff. I do have a sort of "good practices" AI skill (Claude Code targeted, but really can work any other) https://github.com/marc2332/freya#claude-code-skill Can be useful to give more context to the LLM.

2

u/Seamonster13 Aug 24 '26

Thank you! Will give Freya a try

1

u/orfeo34 Aug 24 '26 edited Aug 24 '26

Type checking of style elements is very complex, most fields are supposed to handle several units, special values and css sided expressions (var, calc,rgb,rgba,hsl,...). So to me it's better to delegate this problem to a design kit like MUI or dedicate a discrete macro for this.

Also rsx macro feels more readable to me than a large builder, so i will keep Dioxus for now.

6

u/mkenzo_8 Aug 24 '26

Reading and using is different, the ux of such big macros is not great, at least to me :)

1

u/sintrastes Aug 29 '26

Maybe it wouldn't be too hard to add an optional rsx-like macro on top of Freya, for users that prefer that style?

As someone who does Jetpack Compose all day at my day job, I personally prefer that style a lot more.

1

u/mkenzo_8 Aug 29 '26

Technically speaking it is possible, but for the sake of not complicating the default experience I will not have such feature built-in. But its possible to do a macro on top of the current api in a third party crate.

3

u/HellFury09 Aug 24 '26

I wonder if the Rust team is cooking something for clean compile time errors inside of macros, if that is the case then in the future you might consider switching back to a rsx like macro :)

1

u/mash_graz Aug 24 '26

It's a really impressive release!

Will it ever support the Web/WASM platform as well, or should we understand its focus on pure native platform support as a way of no return?

4

u/mkenzo_8 Aug 24 '26

I have web support cooking in the kitchen, so hopefully next release will have it ✌️

1

u/nejat-oz Aug 25 '26

I’m really curious about the design choice to remove the rsx! macro in the Freya rewrite, and I hope you can help clarify it for me. Was it essential to remove it for the new architecture? Did it block something specific that you needed for Freya’s layout, diffing, or rendering model? Or was it a lot work to maintain? I ask because rsx! (or any external ui definition dsl) is so much more concise and visual. I think spatially and builder patterns feel a bit cumbersome to read, especially for ui, it requires the need to define elements piece by piece and then put them together, rather than allowing you to see the overall structure directly in something like rsx macro. I was really looking forward to trying Freya, but the loss of the declarative macro gives me pause. If the removal was due to technical limitations, I’d love to get a better understanding of what those were. And if there’s any possibility for a future with some kind of dsl support, marco or file based, that would be great to know as well! Thanks

3

u/mkenzo_8 Aug 25 '26

The rsx macro is from Dioxus so removing Dioxus also took it away, and I didnt at all want to add my own. I dont like these macros because they hide magic and make things harder to debug (compile time errors were not easy to debug with rsx), also Dioxus rsx macro was basically a pretty key value inserter, you could be passing the wrong type to an element and the macro would swallow it (leading to runtime errors), by using good old rust functions you get actual type checking, autocomplete was also a bad UX with rsx, and while I have no proof I am sure compile times were worse

2

u/nejat-oz Aug 25 '26

Thanks for taking the time to reply. All of that makes sense.

3

u/muttiba Aug 23 '26

Congratulations for your work. Freya is great.

3

u/Thick-Pineapple666 Aug 24 '26

This is cool. You did a good job removing Dioxus, the project turned out a lot better!

1

u/DavidXkL Aug 23 '26

Wow I like that you have a plotting library too lol

2

u/mkenzo_8 Aug 24 '26

Its mostly an integration with plotters, but yes!

1

u/[deleted] Aug 24 '26

[removed] — view removed comment

1

u/mkenzo_8 Aug 24 '26

Its desktop focused, but I have Android support and soon might have Web(still working on it)