xref: /aosp_15_r20/external/bazelbuild-rules_rust/examples/bzlmod/proto/Cargo.toml (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1*d4726bddSHONG Yifan[workspace]
2*d4726bddSHONG Yifanresolver = "2"
3*d4726bddSHONG Yifan
4*d4726bddSHONG Yifanmembers = [
5*d4726bddSHONG Yifan    "proto_bindings",
6*d4726bddSHONG Yifan    "grpc_server",
7*d4726bddSHONG Yifan    "grpc_client",
8*d4726bddSHONG Yifan]
9*d4726bddSHONG Yifan
10*d4726bddSHONG Yifan
11*d4726bddSHONG Yifan[workspace.package]
12*d4726bddSHONG Yifanedition = "2021"
13*d4726bddSHONG Yifanrust-version = "1.78.0"
14*d4726bddSHONG Yifanreadme = "README.md"
15*d4726bddSHONG Yifan
16*d4726bddSHONG Yifan
17*d4726bddSHONG Yifan[workspace.dependencies]
18*d4726bddSHONG Yifan# Internal crates
19*d4726bddSHONG Yifanproto_bindings = { path = "proto_bindings" }
20*d4726bddSHONG Yifan# External crates
21*d4726bddSHONG Yifanprost = { version = "0.12.6" }
22*d4726bddSHONG Yifanprost-types = { version = "0.12.6", default-features = false }
23*d4726bddSHONG Yifantonic = { version = "0.11.0", features = ["transport"] }
24*d4726bddSHONG Yifantonic-build = "0.11.0"
25*d4726bddSHONG Yifantokio = { version = "1.38", default-features = false, features = ["macros", "net", "rt-multi-thread", "signal"] }
26*d4726bddSHONG Yifan
27*d4726bddSHONG Yifan
28*d4726bddSHONG Yifan# Optimize all crates
29*d4726bddSHONG Yifan[profile.release]
30*d4726bddSHONG Yifanopt-level = 3
31*d4726bddSHONG Yifanstrip = true  # Automatically strip debug symbols from the binary
32*d4726bddSHONG Yifanlto = true    # Enable Link Time Optimization (LTO)
33*d4726bddSHONG Yifancodegen-units = 1 # Reduce Parallel Code Generation Units to Increase Optimization
34*d4726bddSHONG Yifan
35*d4726bddSHONG Yifan
36*d4726bddSHONG Yifan# There's a Cargo feature named profile-overrides
37*d4726bddSHONG Yifan# that lets you override the optimization level of dependencies.
38*d4726bddSHONG Yifan# https://docs.rust-embedded.org/book/unsorted/speed-vs-size.html
39*d4726bddSHONG Yifan[profile.release.package."*"]
40*d4726bddSHONG Yifanopt-level = 3
41*d4726bddSHONG Yifanstrip = 'debuginfo'  # Automatically strip debug infos from the binary to reduce size
42*d4726bddSHONG Yifancodegen-units = 1 # Reduce Parallel Code Generation Units to Increase Optimization
43