Skip to content

Commit b39f13b

Browse files
committed
Maybe cargo cross isn't supported? Try explicit config file
1 parent 19d253a commit b39f13b

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

Cargo.toml

-29
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,6 @@ tokio = { version = "1.32" }
2424
tracing = { version = "0.1" }
2525
uuid = { version = "1.6", default-features = false, features = ["v4", "serde"] }
2626

27-
# Ref https://github.com/cross-rs/cross/blob/main/docs/custom_images.md#adding-dependencies-to-existing-images
28-
[workspace.metadata.cross.target.aarch64-unknown-linux-gnu]
29-
pre-build = [
30-
"dpkg --add-architecture $CROSS_DEB_ARCH",
31-
"apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH"
32-
]
33-
[workspace.metadata.cross.target.aarch64-unknown-linux-musl]
34-
pre-build = [
35-
"dpkg --add-architecture $CROSS_DEB_ARCH",
36-
"apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH"
37-
]
38-
[workspace.metadata.cross.target.x86_64-unknown-linux-gnu]
39-
pre-build = [
40-
"dpkg --add-architecture $CROSS_DEB_ARCH",
41-
"apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH"
42-
]
43-
[workspace.metadata.cross.target.x86_64-unknown-linux-musl]
44-
pre-build = [
45-
"dpkg --add-architecture $CROSS_DEB_ARCH",
46-
"apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH"
47-
]
48-
[workspace.metadata.cross.target.x86_64-apple-darwin]
49-
pre-build = [
50-
"brew install protobuf"
51-
]
52-
[workspace.metadata.cross.target.aarch64-apple-darwin]
53-
pre-build = [
54-
"brew install protobuf"
55-
]
5627

5728
[profile.release]
5829
lto = true # Optimize our binary at link stage.

Cross.toml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Ref https://github.com/cross-rs/cross/blob/main/docs/custom_images.md#adding-dependencies-to-existing-images
2+
[target.aarch64-unknown-linux-gnu]
3+
pre-build = [
4+
"dpkg --add-architecture $CROSS_DEB_ARCH",
5+
"apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH"
6+
]
7+
[target.aarch64-unknown-linux-musl]
8+
pre-build = [
9+
"dpkg --add-architecture $CROSS_DEB_ARCH",
10+
"apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH"
11+
]
12+
[target.x86_64-unknown-linux-gnu]
13+
pre-build = [
14+
"dpkg --add-architecture $CROSS_DEB_ARCH",
15+
"apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH"
16+
]
17+
[target.x86_64-unknown-linux-musl]
18+
pre-build = [
19+
"dpkg --add-architecture $CROSS_DEB_ARCH",
20+
"apt-get update && apt-get --assume-yes install protobuf-compiler:$CROSS_DEB_ARCH"
21+
]
22+
[target.x86_64-apple-darwin]
23+
pre-build = [
24+
"brew install protobuf"
25+
]
26+
[target.aarch64-apple-darwin]
27+
pre-build = [
28+
"brew install protobuf"
29+
]

0 commit comments

Comments
 (0)