Skip to content
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

Merged
merged 3 commits into from
Dec 18, 2019

Conversation

fredchenbj
Copy link
Member

@fredchenbj fredchenbj commented Dec 11, 2019

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

Signed-off-by: fredchenbj <cfworking@163.com>
// 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");
Copy link
Member

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/*

@Connor1996
Copy link
Member

Sorry for the late review, LGTM overall

Signed-off-by: fredchenbj <cfworking@163.com>
Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Connor1996 Connor1996 added the status/can-merge Status: Can merge to base branch label Dec 18, 2019
@sre-bot
Copy link
Collaborator

sre-bot commented Dec 18, 2019

/run-all-tests

@@ -23,6 +23,7 @@ sse = ["libtitan_sys/sse"]
[build-dependencies]
cc = "1.0.3"
cmake = "0.1"
bindgen = "0.52"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems bindgen 0.52 is conflicting with grpcio, which is using bindgen 0.51. Any thoughts on how to fix?
Screen Shot 2019-12-18 at 4 43 12 PM

Copy link
Member Author

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/can-merge Status: Can merge to base branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants