Make bindings no_std compatible

This commit is contained in:
Rafael Caricio 2020-04-11 20:35:33 +02:00
parent 633b076e38
commit e5c73143d0
6 changed files with 853 additions and 9512 deletions

View file

@ -3,10 +3,12 @@ name = "demo"
version = "0.1.0" version = "0.1.0"
authors = ["Rafael Caricio <crates@caric.io>"] authors = ["Rafael Caricio <crates@caric.io>"]
edition = "2018" edition = "2018"
publish = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
lvgl-sys = { path = "../../lvgl-sys" } lvgl-sys = { path = "../../lvgl-sys" }
lvgl = { path = "../../lvgl" }
sdl2 = "0.33.0" sdl2 = "0.33.0"
lazy_static = "1.4.0" lazy_static = "1.4.0"

View file

@ -12,6 +12,7 @@ links = "lvgl"
name = "lvgl_sys" name = "lvgl_sys"
[dependencies] [dependencies]
cty = "0.2.1"
[build-dependencies] [build-dependencies]
cc = "1.0.50" cc = "1.0.50"

View file

@ -37,6 +37,10 @@ fn main() {
]; ];
bindgen::Builder::default() bindgen::Builder::default()
.header(src.parent().unwrap().join("lvgl.h").to_str().unwrap()) .header(src.parent().unwrap().join("lvgl.h").to_str().unwrap())
.layout_tests(false)
.use_core()
.ctypes_prefix("cty")
.raw_line("use cty;")
.clang_args(&cc_args) .clang_args(&cc_args)
.generate() .generate()
.expect("Unable to generate bindings") .expect("Unable to generate bindings")

File diff suppressed because it is too large Load diff

View file

@ -3,8 +3,10 @@ name = "lvgl"
version = "0.1.0" version = "0.1.0"
authors = ["Rafael Caricio <crates.lvgl@caric.io>"] authors = ["Rafael Caricio <crates.lvgl@caric.io>"]
edition = "2018" edition = "2018"
repository = "https://github.com/rafaelcaricio/lvgl-rs"
license = "MIT" license = "MIT"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
lvgl-sys = { path = "../lvgl-sys" }

View file

@ -1,3 +1,5 @@
#![no_std]
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
#[test] #[test]