lvgl / lv_binding_rust

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).
MIT License
687 stars 71 forks source link

Fix `demo` example in release mode #74

Closed nia-e closed 1 year ago

nia-e commented 1 year ago

This is needed for the demo example to run when compiled with --release.

This is terrifying. We're introducing UB somewhere with the display logic and it's causing a miscompilation. The buffer logic also segfaults on latest nightly. I figured this out while messing with logic to get custom font support... I'll open a PR for that later once I have this figured out. In the meantime, this is mergeable as-is to at least make latest rustc stable work.

nia-e commented 1 year ago

Note that the sdl.rs example worked just fine before this and works fine on current nightly also. Actually it seems all embedded_graphics-requiring examples are broken on anything other than stable, including on rustc beta.