From 5c8927d8d696989b9ddc8300de1fa5a8bd9c923e Mon Sep 17 00:00:00 2001 From: Rafael Caricio Date: Sat, 6 Mar 2021 21:09:06 +0100 Subject: [PATCH] Disable lvgl original comments in bindings We disable the comments generation here because some comments cause the `cargo test` command to fail. Some of the original comments have invalid tokens like `TYPEDEFS` causing issues. We should recommend users to look the original comments in the original lvgl in their C API docs. --- README.md | 6 ++++++ lvgl-sys/build.rs | 1 + 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 672d90d..348843b 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,12 @@ In order to build the `lvgl` project you will need the following system dependen $ sudo apt install build-essential llvm clang ``` +If you want to build the examples, then you will need to install SDL2 as well. + +``` +$ sudo apt install libsdl2-dev +``` + ## Usage Edit your `Cargo.toml` file dependencies with: diff --git a/lvgl-sys/build.rs b/lvgl-sys/build.rs index 0b53978..0f6deb8 100644 --- a/lvgl-sys/build.rs +++ b/lvgl-sys/build.rs @@ -101,6 +101,7 @@ fn main() { let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); let bindings = bindgen::Builder::default() .header(shims_dir.join("lvgl_sys.h").to_str().unwrap()) + .generate_comments(false) .layout_tests(false) .use_core() .rustfmt_bindings(true)