How to get involved? #37
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: rafaelcaricio/lvgl-rs#37
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
I'm using this crate for some embedded firmware I'm working on, and I'm aware that some features are missing.
I wanted to ask if it were possible to have tracker issues to give those who want to help, a good place to start coding on?
Thanks!
Hi @shymega,
Thank you for the interest in helping! I've been quite busy lately and could not work as much as I would've liked in lvgl-rs in the last few months. Your help is more than welcome. I will post here later a longer description on what I am thinking and how/where you can jump in to help.
Cheers!
Hey. Looking forward to it! I had a bit of trouble compiling, but figured out I needed to enable LVGL in the
lv_conf.h
in the end.. :)Hi @shymega,
I finally got around to write back to you.
So the status of the project is that it works for the most basic usage, like drawing widgets to the screen and setting the basic options. We don't have a way to create custom styles yet, we can set some properties directly into the widgets though. Customization of fonts are also not possible unless using
unsafe
. My ideal scenario in general is to make it possible for people to use this crate without ever needing to write anyunsafe
code.When it comes to project structure. We have three crates:
All those crates comes together in the
lvgl
crate. We use thelvgl-codegen
to read the output of the bindgen and from the function signatures, we try to generate the binding code. Thelvgl-codegen
has mapping to what to do depending on the arguments of the functions. In this test you can see how it works:81cb1bee4c/lvgl-codegen/src/lib.rs (L556-L589)
From the bindgen code to the final LVGL Rust binding. The basic object structure is defined using this macro
81cb1bee4c/lvgl/src/lv_core/obj.rs (L120)
in this file you can also understand the basic structure of all Widget objects in the Rust LVGL. If you want to define something extra and specific for some Widget, we can add here81cb1bee4c/lvgl/src/widgets
.The basic setup of display and all the bootstrap code necessary for LVGL is in this file
81cb1bee4c/lvgl/src/ui.rs
What I would like to do next? Increase the coverage of the generated code, ideally we could have most of the bindings auto-generated. So contributions to the
lvgl-codegen
are the most wanted right now. I would like to find a way to generate all those enums:81cb1bee4c/lvgl/src/widgets/label.rs (L13-L20)
You can see here that this could well be generated.
Find everything that matches
LV_LABEL_
which belongs to the Label Object type. Then find everything that belongs toLABEL_ALING_
and then create the armsLEFT
,CENTER
,RIGHT
, andAUTO
. Then split, convert to PascalCase and add all together in an Rustenum
.Let me know if you get the idea. You're free to implement anything, but just keep in mind if and how it could be generalized in the
lvgl-codegen
, that is the preferred place to contribute right now. Also you can see the code inlvgl-codegen
is all in one file, that is because I am still focusing on making it work first before starting to split in multiple files and think about a nice code architecture. Since it is a completely new approach for me, I don't have a clear view yet on how to make the code "look nice" at this stage.Sorry if my last comment was confusing. You can of course ask my anything and I will answer what I know. :)
Yeah, I have a repo with GNU Guile bindings, and the single file output is a total pain. Gotcha with porting. Should I just make PRs for each feature/enhancement - like adding a new enum to
LabelAlign
- for example? Thelvgl-codegen
request looks pretty simple. What would be great is an automatically generated list of entries remaining - but I don't think its possible! 😆Also, would you be able to add the 'Help Wanted' label to this issue? Apologies for the late reply, too!
@shymega yes, you can sent small PRs. That would be great actually :)
Alright, I'll take a look. I moved to JetBrains CLion recently, which I'm finding excellent for Rust development -- so, hopefully, I'll be more productive! Note: I am also pursuing employment, so if I do find a job, my time may be more limited, although I'll try to work on this when I can. The firmware I'm working on relies on LVGL for display support, so it's definitely in my interests.
I use CLion as well, it's great. 😄 No rush at all, just have fun... I also work in this project in my free time whenever I feel like. There are no deadlines here 🙈 Good luck in your job hunting! 👍🏽