Skip to content

Commit 6516d83

Browse files
committed
feat(publish): add instructions to publish the crate, allow to skip file generation in build script
1 parent aa78e36 commit 6516d83

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ fn main() {
253253
let build_dir = Path::new(crate_dir.as_str());
254254
let output_file = build_dir.join(format!("{}.h", package_name));
255255

256+
if env::var("PUBLISH_SKIP_BUILD").is_ok() {
257+
return;
258+
}
259+
256260
cbindgen::generate(crate_dir)
257261
.expect("Unable to generate bindings")
258262
.write_to_file(&output_file);

0 commit comments

Comments
 (0)