diff --git a/sys/Cargo.toml b/sys/Cargo.toml index e035959..1c1eb9d 100644 --- a/sys/Cargo.toml +++ b/sys/Cargo.toml @@ -7,13 +7,20 @@ license = "Unlicense" documentation = "https://docs.rs/whisper-rs-sys" repository = "https://github.com/tazz4843/whisper-rs" links = "whisper" -exclude = [ - "whisper.cpp/bindings", - "whisper.cpp/examples", - "whisper.cpp/extra", - "whisper.cpp/models", - "whisper.cpp/samples", - "whisper.cpp/tests", +include = [ + "whisper.cpp/bindings/javascript/package-tmpl.json", + "whisper.cpp/bindings/CMakeLists.txt", + "whisper.cpp/cmake", + "whisper.cpp/coreml", + "whisper.cpp/CMakeLists.txt", + "whisper.cpp/ggml.c", + "whisper.cpp/ggml.h", + "whisper.cpp/LICENSE", + "whisper.cpp/whisper.cpp", + "whisper.cpp/whisper.h", + "src/*.rs", + "build.rs", + "wrapper.h", ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/sys/build.rs b/sys/build.rs index bd440e1..dc45e30 100644 --- a/sys/build.rs +++ b/sys/build.rs @@ -108,7 +108,10 @@ fn main() { } // clean the whisper build directory to prevent Cargo from complaining during crate publish + env::set_current_dir("..").expect("Unable to change directory to whisper.cpp"); _ = std::fs::remove_dir_all("build"); + // for whatever reason this file is generated during build and triggers cargo complaining + _ = std::fs::remove_file("bindings/javascript/package.json"); } // From https://github.com/alexcrichton/cc-rs/blob/fba7feded71ee4f63cfe885673ead6d7b4f2f454/src/lib.rs#L2462