Skip to content

Commit de81e7b

Browse files
authored
Cargo.toml: Bump Prost to 0.11 (#98)
Prost 0.11 doesn't build a protobuf compiler from source anymore, instead requiring that one is available on the filesystem. Because Google's protobuf compiler is only available in 64-bit Linux, and most of the cross-compile targets use 32-bit Linux, the 'protobuf' feature is disabled in cross-compilation. Signed-off-by: Adam Chalmers <[email protected]>
1 parent 682b24e commit de81e7b

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/rust.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
name: Check
88
runs-on: ubuntu-latest
99
steps:
10+
- name: Install Protoc
11+
uses: arduino/setup-protoc@v1
1012
- uses: actions/checkout@v2
1113
- uses: actions-rs/toolchain@v1
1214
with:
@@ -45,6 +47,8 @@ jobs:
4547
name: Test Suite
4648
runs-on: ubuntu-latest
4749
steps:
50+
- name: Install Protoc
51+
uses: arduino/setup-protoc@v1
4852
- uses: actions/checkout@v2
4953
- uses: actions-rs/toolchain@v1
5054
with:
@@ -79,6 +83,8 @@ jobs:
7983
name: Rustfmt
8084
runs-on: ubuntu-latest
8185
steps:
86+
- name: Install Protoc
87+
uses: arduino/setup-protoc@v1
8288
- uses: actions/checkout@v2
8389
- uses: actions-rs/toolchain@v1
8490
with:
@@ -95,6 +101,8 @@ jobs:
95101
name: Clippy
96102
runs-on: ubuntu-latest
97103
steps:
104+
- name: Install Protoc
105+
uses: arduino/setup-protoc@v1
98106
- uses: actions/checkout@v2
99107
- uses: actions-rs/toolchain@v1
100108
with:
@@ -124,6 +132,8 @@ jobs:
124132
name: Check rustdoc intra-doc links
125133
runs-on: ubuntu-latest
126134
steps:
135+
- name: Install Protoc
136+
uses: arduino/setup-protoc@v1
127137
- uses: actions/checkout@v2
128138
- uses: actions-rs/toolchain@v1
129139
with:
@@ -159,4 +169,5 @@ jobs:
159169
with:
160170
use-cross: true
161171
command: build
162-
args: --release --target=${{ matrix.target }} --all-features
172+
# Note that this does not test the `protobuf` feature (for now). See reasoning in https://github.com/prometheus/client_rust/pull/98/.
173+
args: --release --target=${{ matrix.target }}

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ dtoa = "1.0"
2121
itoa = "1.0"
2222
parking_lot = "0.12"
2323
prometheus-client-derive-encode = { version = "0.3.0", path = "derive-encode" }
24-
prost = { version = "0.9.0", optional = true }
25-
prost-types = { version = "0.9.0", optional = true }
24+
prost = { version = "0.11.0", optional = true }
25+
prost-types = { version = "0.11.0", optional = true }
2626
void = { version = "1.0", optional = true }
2727

2828
[dev-dependencies]
@@ -38,7 +38,7 @@ tokio = { version = "1", features = ["rt-multi-thread", "net", "macros", "signal
3838
hyper = { version = "0.14.16", features = ["server", "http1", "tcp"] }
3939

4040
[build-dependencies]
41-
prost-build = { version = "0.9.0", optional = true }
41+
prost-build = { version = "0.11.0", optional = true }
4242

4343
[[bench]]
4444
name = "family"

0 commit comments

Comments
 (0)