-
Notifications
You must be signed in to change notification settings - Fork 258
Add a way to not use bindgen #499
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
Conversation
Fix tikv#489 Add the `use-bindgen` feature which is activated by default. If disabled, then the previously generated bindings will be used instead of generating new ones. It will fail compilation if this feature is disabled for the non supported targets. If enabled, the behaviour is the same as before. Signed-off-by: Hugues de Valon <[email protected]>
hmm |
How about using rust-lang/cargo#7914 to enable use-bindgen for unsupported targets? |
Also fix the CI script for Mac Signed-off-by: Hugues de Valon <[email protected]>
That is a good idea but I think the I fixed the Mac CI workflow here by enabling the I am aware though that this will break compilation for everyone using this crate with |
How about:
? |
ooh yes I guess that would do it, nice 👌 With the following: diff --git a/Cargo.toml b/Cargo.toml
index 70b1b39..a02033d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,7 +17,7 @@ autoexamples = false
all-features = true
[dependencies]
-grpcio-sys = { path = "grpc-sys", version = "0.7", default-features = false }
+grpcio-sys = { path = "grpc-sys", version = "0.7" }
libc = "0.2"
futures = "0.3"
protobuf = { version = "2.0", optional = true }
@@ -30,7 +30,7 @@ parking_lot = "0.11"
members = ["proto", "benchmark", "compiler", "interop", "tests-and-examples"]
[features]
-default = ["protobuf-codec", "secure", "use-bindgen"]
+default = ["protobuf-codec", "secure"]
protobuf-codec = ["protobuf"]
prost-codec = ["prost", "bytes"]
secure = ["grpcio-sys/secure"]
@@ -47,3 +47,6 @@ travis-ci = { repository = "tikv/grpc-rs" }
[patch.crates-io]
grpcio-compiler = { path = "compiler", version = "0.7.0", default-features = false }
+
+[target.'cfg(not(all(any(target_arch="x86_64", target_arch="aarch64"), target_os="linux", target_env="gnu")))'.dependencies]
+grpcio-sys = { path = "grpc-sys", version = "0.7", features = ["use-bindgen"] }
diff --git a/grpc-sys/Cargo.toml b/grpc-sys/Cargo.toml
index 60e1d2f..c02f7eb 100644
--- a/grpc-sys/Cargo.toml
+++ b/grpc-sys/Cargo.toml
@@ -53,7 +53,6 @@ openssl-sys = { version = "0.9", optional = true, features = ["vendored"] }
libz-sys = { version = "1.0.25", features = ["static"] }
[features]
-default = ["use-bindgen"]
secure = []
openssl = ["secure"]
openssl-vendored = ["openssl", "openssl-sys"] compiling with I guess that would do it but the main problem I see is that this requires a |
Got it. I guess this can only be brought to 0.8.0. |
Hello @BusyJay ! Do you know when |
Hello @BusyJay Kindly pinging you again to know about plans for a next release 👌 |
Excellent! Sorry for the spam 😋 |
Thanks for the release 👌 |
Fix #489
Add the
use-bindgen
feature which is activated by default.If disabled, then the previously generated bindings will be used instead of generating new ones. It will fail compilation if this feature is disabled for the non supported targets.
If enabled, the behaviour is the same as before.