Cannot Add new header files in wrapper.h
AregevDev opened this issue · comments
Hello,
I am trying to add the version functions to russimp-sys, I am adding #include <assimp/version.h>
inside wrapper.h
. bindgen
runs successfully but does not generate the added functions.
No matter what I try, I cannot make it work, it's like bindgen ignores the file completely.
Do you know anything about it?
Thanks
I figured it out, there's a bindings.rs
file inside the prebuilt package, you only run bindgen when building from source
I think it's better to run it anyway or even allow building static versions of assimp
What do you think?
I am kind of lost on how you fetch the library, at least on Windows
When using the prebuilt
feature, the script downloads the appropriate package from Releases
which contain the libraries and the bindgins.rs
, it unpacks, reads the manifest.json
and and calls install()
to set the search directories.
First of all, you are not running bindgen when using prebuilt
, I think it's best that you unpack the prebuilt library and call bindgen anyway. Either add the include files to the prebuilt package or use the submodule to fetch them. In addition, you don't seem to use your assimp
submodule. I have to ask, why is it there? When you build assimp from source, you call git manually to clone the repo in the buildscript, otherwise you just use vcpkg
for dynamic linking or use the prebuilt package's libs.
I suggest using your submodule when building from source, that way you can checkout the latest version and avoid conflicts.
I can rewrite build.rs
to include those changes and clean it up a little, if you are interested.
These changes will allow us to add more functionality to the crate without releasing a new prebuilt package when enabling the feature.
Peace
vcpkg
's library version is outdated. if we already build the static from source, maybe build the dynamic version from source as well.
Tell me what you think
You did a great job.
I answered on your PR =)