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
668 stars 69 forks source link

Enable Support for Cross Compilation #155

Open GreenYun opened 10 months ago

GreenYun commented 10 months ago

I have suffering cross-compiling lvgl and lvgl-sys as dependencies of my project since the invocation of bindgen would always using my host toolchain.

I cannot find any better idea than rewriting the build script to add more environment variables and compiler flags.

Issue #53 gave ideas using the cross tool that is not suitable for my environment. In the situation of my work, I have no Docker environment even the toolchain is not provided by any system package manager. I have only a directory with pre-compiled Xcompiler. For normal rust projects, specifying target triples and providing linkers to rustc will get everything worked.

I wonder if there are any workarounds to provide enough information to the build system and get things worked?