LVGL bindings for Rust. A powerful and easy-to-use embedded GUI with many widgets, advanced visual effects (opacity, antialiasing, animations) and low memory requirements (16K RAM, 64K Flash).
This was a lovely (awful) issue to fix, and was actually the core issue underpinning #74. When implementing the lv_disp_t, the LVGL docs specify that the driver object must be the first member of the struct. In #67 I changed the struct we have here to also hold the buffer, as this simplified both the API and the internal logic. However, I was not aware of the requirement re: struct layout, and Rust doesn't actually guarantee any specific type layout; so, on certain buffer sizes, the compiler was putting the buffer before the driver.
On the bright side, all this segfault chasing has quadrupled my productivity with lldb.
This was a lovely (awful) issue to fix, and was actually the core issue underpinning #74. When implementing the
lv_disp_t
, the LVGL docs specify that the driver object must be the first member of the struct. In #67 I changed the struct we have here to also hold the buffer, as this simplified both the API and the internal logic. However, I was not aware of the requirement re: struct layout, and Rust doesn't actually guarantee any specific type layout; so, on certain buffer sizes, the compiler was putting the buffer before the driver.On the bright side, all this segfault chasing has quadrupled my productivity with
lldb
.