-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: Remove build dependency on
protoc
(#104)
The protobuf project does not publish `protoc` binaries for 32-bit ARM hosts, which complicates our compilation tooling for ARM. This problem can be avoided completely by committing the generated interface bindings so that crates that depend on `linkerd2-proxy-api` don't need any build dependencies. This change removes the `client`, `server`, and `transport` features. Client and server bindings are now always generated for gRPC services. The `transport` feature is removed, since it cannot be optional if the generated code is stored in the repo. We don't want to require tonic's transport feature because it pulls in many dependencies that we don't really need. Signed-off-by: Oliver Gould <[email protected]>
- Loading branch information
Showing
18 changed files
with
2,016 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Gopkg.lock linguist-generated=false | ||
go/**/*.pb.go linguist-generated=true | ||
src/gen/*.rs linguist-generated=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "linkerd2-proxy-api" | ||
version = "0.4.0" | ||
version = "0.5.0" | ||
authors = ["Linkerd Developers <[email protected]>"] | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
|
@@ -14,22 +14,15 @@ rust-version = "1.59" | |
[features] | ||
default = [] | ||
|
||
# Generate code that is compatible with Tonic's `transport` module. | ||
transport = ["tonic-build/transport", "tonic/transport"] | ||
|
||
# Enable generation of arbitrary protos with quickcheck. | ||
arbitrary = ["quickcheck"] | ||
|
||
# Determines whether clients or servers are built | ||
client = ["transport"] | ||
server = ["transport"] | ||
|
||
destination = ["http_types", "net", "prost-types"] | ||
destination = ["http_types", "net", "prost-types", "tonic/codegen"] | ||
http_types = ["http", "thiserror"] | ||
identity = ["prost-types"] | ||
inbound = ["net", "prost-types"] | ||
identity = ["prost-types", "tonic/codegen"] | ||
inbound = ["net", "prost-types", "tonic/codegen"] | ||
net = ["ipnet", "thiserror"] | ||
tap = ["h2", "http_types", "net", "prost-types"] | ||
tap = ["h2", "http_types", "net", "prost-types", "tonic/codegen"] | ||
|
||
[dependencies] | ||
h2 = { version = "0.3", optional = true } | ||
|
@@ -39,7 +32,13 @@ prost = "0.10" | |
prost-types = { version = "0.10", optional = true } | ||
quickcheck = { version = "1", default-features = false, optional = true } | ||
thiserror = { version = "1", optional = true } | ||
tonic = { version = "0.7", default-features = false, features = ["prost", "codegen"] } | ||
|
||
[build-dependencies] | ||
tonic-build = { version = "0.7", default-features = false, features = ["prost"] } | ||
[dependencies.tonic] | ||
version = "0.7" | ||
default-features = false | ||
features = ["prost"] | ||
|
||
[dev-dependencies.tonic-build] | ||
version = "0.7" | ||
default-features = false | ||
features = ["prost"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.