Skip to content

Commit d14ba09

Browse files
committed
fix binding for publish
1 parent c96e8b7 commit d14ba09

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
extern crate bindgen;
22

33
use cmake::Config;
4+
use std::env;
5+
use std::path::PathBuf;
46

57
fn main() {
68
// Generate bindings for RediSearch
@@ -15,9 +17,10 @@ fn main() {
1517
.generate()
1618
.expect("error generating RediSearch bindings");
1719

20+
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
1821
bindings
19-
.write_to_file("src/raw/bindings.rs")
20-
.expect("failed to write RediSearch bindings to file");
22+
.write_to_file(out_path.join("bindings.rs"))
23+
.expect("failed to write bindings to file");
2124

2225
// Find and link statically to libredisearch.a
2326
// TODO: Consider splitting the low level libredisearch wrapper off into a separate `-sys` crate.

0 commit comments

Comments
 (0)