-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bindgen: pre-generate bindings #402
bindgen: pre-generate bindings #402
Conversation
Signed-off-by: fredchenbj <cfworking@163.com>
librocksdb_sys/build.rs
Outdated
// Other platforms use bindgen to generate the bindings every time. | ||
fn config_binding_path() { | ||
let file_path: PathBuf; | ||
println!("cargo:rerun-if-changed=bindings/x86_64-unknown-linux-gnu-bindings.rs"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add cargo:rerun-if-env-changed=UPDATE_BIND
, and remove this cause it will forbid rerun when other files changed in librocksdb_sys/*
Sorry for the late review, LGTM overall |
Signed-off-by: fredchenbj <cfworking@163.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
@@ -23,6 +23,7 @@ sse = ["libtitan_sys/sse"] | |||
[build-dependencies] | |||
cc = "1.0.3" | |||
cmake = "0.1" | |||
bindgen = "0.52" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use bindgen 0.51 to fix it ?
This pr is extraced from pr #398 to make code review easier.
Like grpc-rs pr tikv/grpc-rs#356, this pr pre-generate the bindings. Later, I would finish pr #398 based on this pre-generated bindings.
Signed-off-by: fredchenbj cfworking@163.com