Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on programming.dev
rust·Rustbyvan2z

What popular crates are available to build GUIs with widgets WITHOUT GPU?

For some reason, it seems popular for GUI crates to use the GPU. I just want to make simple widgets, for like a calculator.

No fancy graphics. I want it quite lightweight.

For some reason, popular GUI crates love to do everything through a GPU, which bumps up the memory / cpu use significantly.

View original on programming.dev
15

10 replies

sh.itjust.works

Funny you should mention that. I think iced as of four days ago can do this!

If I'm reading the release notes and Cargo.toml right, cargo add iced --no-default-features and you should be good to go, as tiny-skia will be used as a rendering backend instead of wgpu.

13
van2zreply
programming.dev

OMG, thank you! I have been using Iced. My simple application's RAM just went down from 80 MB to only 4 MB.

The executable size went down from about 8 MB to 2.5 MB

13
hch12907reply
programming.dev

8MB to 2.5MB is a huge drop. I wonder what caused the bloat - a crate?

3

Slint fits the bill: We have a demo running on a line-buffer in a microcontroller with <300KiB of RAM. Framebuffers are of course supported as well, as is GPU-accelerated rendering.

11
BB_Creply
lemm.ee

Did you tick "Bot Account" by accident?

4

I did tick that, since I saw text boxes and went "give me everything" without reading:-)

Fixed. Thank you for pointing this out.

4

You have much to learn Young Padawan. If you're wanting to make a desktop app in Rust it behooves one to avoid embedded web environments. For performance reasons of course.

2

You reached the end

What popular crates are available to build GUIs with widgets WITHOUT GPU? | Spyke