Open puzrin opened 5 years ago
Hi,
I just found this issue and I find it very interesting. A couple of weeks ago I started creating LittlevGL (LVGL) bindings for Rust.
https://github.com/rafaelcaricio/lvgl-rs
The project is still in very early stages. A lot of polishing is still necessary as I'm figuring out the best design for the API.
lvgl-rs
highlights:
embedded_graphics
traits, making it compatible with any display drivers.
I've shared the lvgl-rs
project with the folks that created and maintain LVGL and we are exchanging some ideas on how to speed up the process of creating the bindings. I don't have a timeline for when it will be completed as this is a project I develop in my free time. However, I'm open to accepting pull requests and feedback about the project in general.
lvgl-rs
seems to be exactly what you are looking for. Let me know what you think.
@rafaelcaricio
lvgl-rs
seems to be exactly what you are looking for. Let me know what you think.
At current moment i use lvgl directly, and don't like use it via bindings. While still the best of available in current moment, lvgl has some controversial architecture decisions, no tests, no benchmarks and so on. IMO, for awesome result, it would be more simple to write native GUI in rust from scratch.
Just FYI, there is slint-ui which can run on embedded. It also comes with an emulator using webassembly and respects most of the criteria. They already have examples using embedded-graphics and can render by line instead of the full frame buffer so it can easily fit in ram. Note that the project is GPL and not MIT/Apache though so it may be incompatible with some projects.
@xgroleau from readme: "Slint apps can run on MCUs with less than 300K of RAM."
That's out of expected for small MCU-s.
@puzrin You definitely don't need the full 300kb of RAM to use it. I've used it successfully with an nrf52840(192kb of ram with the softdevice)while allocating only 24kb of heap for slint (I haven't checked usage). Now obviously consumption vary on the number of components. It's ram usage seems similar but a little higher than lvgl for a similar UI. It does seem to use more flash space though.
i think this is subsequently also fairly well covered by embedded-graphics ^_^
That's not GUI at all, just a shapes drawer.
No GUI, suitable for embedded use on small SOC-s
Currently there are no complete solutions, suitable to create modern interfaces on "small" devices (like 8-16K RAM + 64-128K Flash).
Targeting
I'd suggest to focus on "small" systems like stm32f0-stm32f4 with colour displays up to 320*200.
Reasons:
That's only examples, to explain range of devices, where hardware already CAN run modern GUI, but no appropriate software available. Of cause, you can find lot of exclusions, but reason of GUI request is to fill gap, not to compete with existing libs.
Specifics of hardware restrictions
UX/look
Most of existing GUI-s try to invent own look instead of following one of existing guideline. Result is very poor. IMHO something like Material Design is "minimal possible quality requirement".
PC emulator
When you do simple device, it's not difficult to code "meat". The most time-consuming task become interface polishing. It's not convenient to do such things on bare metal. Having PC emulator of display/touch will speed up development significantly.
Success criteria
Ideally, it would be nice to have GUI, able to create Material Design interfaces on SOCs with 8-16K RAM and 64-128K flash.
References
This chapter replaces "Work in Progress" because referred things are not for rust. But those have a lot of reusable things, and should save a lot of time.