-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
151 lines (140 loc) · 3.39 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[package]
name = "sysMaster"
version = "1.1.0"
authors = ["sysmaster"]
homepage = "http://www.sysmaster.org"
keywords = ["sysmaster", "pid1", "os"]
license = "MulanPSL-2.0"
edition = "2021"
build = "build.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[[bin]]
name = "init"
path = "init/main.rs"
[dependencies]
log = { path = "libs/log" }
mio = { version = "0.8.8", default_features = false, features = [
"os-poll",
"os-ext",
] }
nix = { version = "0.24", default-features = false, features = [
"fs",
"mount",
"net",
"signal",
"time",
"user",
] }
# tempfile = "=3.6.0"
# 此为开发配置文件, 给 `cargo build` 所使用.
[profile.dev]
opt-level = 'z'
# 控制编译器构建的`--opt-level`。
# 0-1适合调试。 2是良好优化的。最大为 3。
# 's' 企图优化大小, 'z' 则 进一步优化大小.
debug = true
# (u32 or bool) 包括调试信息(调试符号).
# 相当于 `-C debuginfo=2` 编译器 标志.
rpath = false
# 控制 编译器 是否应该设置加载器路径.
# 若为 true, 传递 `-C rpath` 标志 给 编译器.
lto = false
# 链接时间优化通常会减少二进制文件和静态库的大小
# 但会增加编译时间.
# 若是 true, 传递 `-C lto` 标志 给 编译器, 和 若是一个
# 字符串值 像 'thin' ,那会传递 `-C lto=thin`
# 给 编译器
debug-assertions = true
# 控制是否启用调试断言
# (e.g. debug_assert!() 和 算术溢出检查)
codegen-units = 128
# if > 1 并行代码生成,以改善
# 编译时间, 但阻止了些优化.
# 传递 `-C codegen-units`.
panic = 'unwind'
# 恐慌策略 (`-C panic=...`), 也可以是 'abort'
incremental = true
# 是否启用增量编译
overflow-checks = true
# 使用溢出检查进行整数运算。
# 传递 `-C overflow-checks=...`标志 给 compiler.
[profile.release]
opt-level = 'z'
debug = true
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = false
[profile.release.build-override] # +
opt-level = 'z' # +
codegen-units = 1
[profile.release.package."*"]
opt-level = 'z'
codegen-units = 1
[profile.test]
opt-level = 0
debug = 2
rpath = false
lto = false
debug-assertions = true
codegen-units = 16
panic = 'unwind'
incremental = true
overflow-checks = true
[profile.bench]
opt-level = 3
debug = false
rpath = false
lto = false
debug-assertions = false
codegen-units = 16
panic = 'unwind'
incremental = false
overflow-checks = false
[workspace]
members = [
#core
"core/sysmaster",
"core/libcore",
"core/sctl",
#components crates
"core/coms/service",
"core/coms/socket",
"core/coms/target",
"core/coms/mount",
# external binaries
"exts/fstab",
"exts/random_seed",
"exts/rc-local-generator",
"exts/getty-generator",
"exts/sysmonitor",
"exts/devmaster",
"exts/switch_root",
"exts/hostname_setup",
"exts/hwdb",
"exts/machine-id-setup",
# "exts/libudev",
"exts/run",
#internal libraries crates
"libs/cmdproto",
#external libraries crates
"libs/cgroup",
"libs/event",
"libs/basic",
"libs/log",
"libs/libtests",
"libs/watchdog",
"libs/device",
"libs/blkid_rs",
"libs/kmod_rs",
"libs/unit_parser",
"libs/hwdb",
]
exclude = ["docs", "ci", "factory", "tools", "next"]
# fix https://github.com/mdaffin/loopdev/issues/65
[patch.crates-io.loopdev]
git = 'https://gitee.com/overweight/loopdev'
branch = 'bump-bindgen-reduce-version'