加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Cargo.toml 3.34 KB
一键复制 编辑 原始数据 按行查看 历史
[package]
name = "sysMaster"
version = "0.5.1"
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",
#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-generation"]
# fix https://github.com/mdaffin/loopdev/issues/65
[patch.crates-io.loopdev]
git = 'https://gitee.com/overweight/loopdev'
branch = 'bump-bindgen-reduce-version'
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化