Skip to content

Commit 8cd6fdc

Browse files
committed
fix build
1 parent 51eceef commit 8cd6fdc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

build.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
extern crate bindgen;
22
extern crate cc;
33

4+
use std::env;
5+
use std::path::PathBuf;
6+
47
fn main() {
58
// Build a Redis pseudo-library so that we have symbols that we can link
69
// against while building Rust code.
@@ -39,7 +42,8 @@ fn main() {
3942
.generate()
4043
.expect("error generating bindings");
4144

45+
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
4246
bindings
43-
.write_to_file("src/redisraw/bindings.rs")
47+
.write_to_file(out_path.join("bindings.rs"))
4448
.expect("failed to write bindings to file");
4549
}

0 commit comments

Comments
 (0)