Hi,
i tried using this library but it does not compile because bindgen fails to generate the fields of the whisper_full_params struct.
to reproduce, run:
$ cargo init
$ cargo add whisper-cpp-plus
$ cargo build
The full cargo error log is here:
https://gist.github.com/d4mn13l/4988f839366fe48f3d058765ed596308
but all of them are "no field ... on type whisper_full_params".
The definition of whisper_full_params in the generated bindings.rs (at target/debug/build/whisper-cpp-plus-sys-(random value)/out/) looks like this:
#[repr(C)]
#[derive(Debug,Default, Copy, Clone)]
pub struct whisper_full_params {
pub _address: u8,
}
which is what bindgen generates for a forward declared struct.
I also tested the latest commit on the main and chore/whisper-cpp-1.9 branch but the same thing happened.
I am pretty sure that this happens because the original struct in the whisper.cpp library is first forward declared and only later defined. From what i've tested bindgen 0.69 (which is used here) doesnt handle that properly, but bindgen 0.72+ does.
Ive tried forking and bumping the bindgen version to 0.72 but that lead to different build problems.
Im very confused because i dont understand how this could be a bug in either bindgen or this library that nobody had noticed but also i dont know what i could be doing wrong.
Hi,
i tried using this library but it does not compile because bindgen fails to generate the fields of the whisper_full_params struct.
to reproduce, run:
$ cargo init
$ cargo add whisper-cpp-plus
$ cargo build
The full cargo error log is here:
https://gist.github.com/d4mn13l/4988f839366fe48f3d058765ed596308
but all of them are "no field ... on type whisper_full_params".
The definition of whisper_full_params in the generated bindings.rs (at target/debug/build/whisper-cpp-plus-sys-(random value)/out/) looks like this:
which is what bindgen generates for a forward declared struct.
I also tested the latest commit on the main and chore/whisper-cpp-1.9 branch but the same thing happened.
I am pretty sure that this happens because the original struct in the whisper.cpp library is first forward declared and only later defined. From what i've tested bindgen 0.69 (which is used here) doesnt handle that properly, but bindgen 0.72+ does.
Ive tried forking and bumping the bindgen version to 0.72 but that lead to different build problems.
Im very confused because i dont understand how this could be a bug in either bindgen or this library that nobody had noticed but also i dont know what i could be doing wrong.