Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui-sys does not recompile if a libui file changes #98

Open
LoganDark opened this issue Aug 23, 2020 · 0 comments · May be fixed by #99
Open

ui-sys does not recompile if a libui file changes #98

LoganDark opened this issue Aug 23, 2020 · 0 comments · May be fixed by #99
Labels
c-bug Bug - some feature is not working as expected k-buildprocess Issues with building the crate p-medium Medium Priority
Milestone

Comments

@LoganDark
Copy link

LoganDark commented Aug 23, 2020

I think you are missing a .parse_callbacks(Box::new(bindgen::CargoCallbacks)) when you're making the builder, like so:

    // Generate libui bindings on the fly
    let bindings = BindgenBuilder::default()
        .header("wrapper.h")
        .opaque_type("max_align_t") // For some reason this ends up too large
        //.rustified_enum(".*")
        .trust_clang_mangling(false) // clang sometimes wants to treat these functions as C++
        .parse_callbacks(Box::new(bindgen::CargoCallbacks)) // HERE
        .generate()
        .expect("Unable to generate bindings");

You're also missing some println!("cargo:rerun-if-changed={}", src_path(filename)) all over the place after you do base_config.file(src_path(filename)).

@LoganDark LoganDark linked a pull request Aug 23, 2020 that will close this issue
@NoraCodes NoraCodes added c-bug Bug - some feature is not working as expected k-buildprocess Issues with building the crate p-medium Medium Priority labels Aug 29, 2020
@NoraCodes NoraCodes added this to the 0.5 Release milestone Aug 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-bug Bug - some feature is not working as expected k-buildprocess Issues with building the crate p-medium Medium Priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants