2022-11-30 13:18:17 -05:00
|
|
|
[workspace]
|
2025-01-24 13:11:10 -05:00
|
|
|
members = [
|
|
|
|
|
"cli",
|
2025-01-25 14:20:22 +01:00
|
|
|
"system-reinstall-bootc",
|
2025-01-24 13:11:10 -05:00
|
|
|
"lib",
|
2025-04-27 13:29:56 -04:00
|
|
|
"mount",
|
2025-01-24 13:11:10 -05:00
|
|
|
"ostree-ext",
|
2025-01-24 13:13:52 -05:00
|
|
|
"utils",
|
2025-01-24 13:11:10 -05:00
|
|
|
"blockdev",
|
|
|
|
|
"xtask",
|
2025-02-09 10:52:01 -05:00
|
|
|
"tests-integration",
|
2025-02-12 19:21:00 -05:00
|
|
|
"tmpfiles",
|
|
|
|
|
"sysusers",
|
2025-01-24 13:11:10 -05:00
|
|
|
]
|
2023-08-29 17:51:12 -04:00
|
|
|
resolver = "2"
|
2022-11-30 13:18:17 -05:00
|
|
|
|
|
|
|
|
[profile.dev]
|
|
|
|
|
opt-level = 1 # No optimizations are too slow for us.
|
|
|
|
|
|
|
|
|
|
[profile.release]
|
2023-08-22 09:33:30 -04:00
|
|
|
lto = "thin"
|
|
|
|
|
# We use FFI so this is safest
|
|
|
|
|
panic = "abort"
|
|
|
|
|
# We assume we're being delivered via e.g. RPM which supports split debuginfo
|
2023-01-18 17:39:03 -05:00
|
|
|
debug = true
|
|
|
|
|
|
2024-12-01 15:45:16 +01:00
|
|
|
[profile.thin]
|
|
|
|
|
# drop bootc size when split debuginfo is not available and go a step
|
|
|
|
|
# further in size optimization (when tested from 140mb, to 12mb without
|
|
|
|
|
# symbols/debuginfo, to 5.8mb with extra optimizations)
|
|
|
|
|
# https://github.com/johnthagen/min-sized-rust
|
|
|
|
|
# cargo build --profile=thin
|
|
|
|
|
inherits = "release"
|
|
|
|
|
debug = false # Re-strip debug symbols
|
|
|
|
|
strip = true # Strip symbols from binary
|
|
|
|
|
lto = true # Use full lto to remove dead code
|
|
|
|
|
opt-level = 's' # Optimize for size with vector vectorization
|
|
|
|
|
codegen-units = 1 # Reduce number of codegen units to increase optimizations
|
|
|
|
|
|
2023-08-22 09:33:30 -04:00
|
|
|
[profile.releaselto]
|
|
|
|
|
codegen-units = 1
|
|
|
|
|
inherits = "release"
|
|
|
|
|
lto = "yes"
|
|
|
|
|
|
2024-07-16 09:03:21 -04:00
|
|
|
[workspace.dependencies]
|
2025-05-29 13:20:30 -04:00
|
|
|
anstream = "0.6"
|
2024-07-16 09:03:21 -04:00
|
|
|
anyhow = "1.0.82"
|
|
|
|
|
camino = "1.1.6"
|
2025-06-24 07:54:43 -04:00
|
|
|
canon-json = "0.2.1"
|
2023-09-30 15:39:08 -04:00
|
|
|
cap-std-ext = "4.0.3"
|
2024-07-16 09:03:21 -04:00
|
|
|
chrono = { version = "0.4.38", default-features = false }
|
|
|
|
|
clap = "4.5.4"
|
2024-11-07 13:55:29 -05:00
|
|
|
clap_mangen = { version = "0.2.20" }
|
|
|
|
|
hex = "0.4.3"
|
2024-08-15 14:44:29 -04:00
|
|
|
indoc = "2.0.5"
|
2024-11-07 13:55:29 -05:00
|
|
|
indicatif = "0.17.0"
|
2024-07-16 09:03:21 -04:00
|
|
|
fn-error-context = "0.2.1"
|
|
|
|
|
libc = "0.2.154"
|
2025-04-07 15:49:34 -04:00
|
|
|
openssl = "0.10.72"
|
2025-05-29 13:20:30 -04:00
|
|
|
owo-colors = { version = "4" }
|
2025-03-30 16:42:12 +00:00
|
|
|
rustix = { "version" = "1", features = ["thread", "net", "fs", "system", "process", "mount"] }
|
2024-07-16 09:03:21 -04:00
|
|
|
serde = "1.0.199"
|
|
|
|
|
serde_json = "1.0.116"
|
2024-08-15 14:44:29 -04:00
|
|
|
similar-asserts = "1.5.0"
|
|
|
|
|
static_assertions = "1.1.0"
|
2024-07-16 09:03:21 -04:00
|
|
|
tempfile = "3.10.1"
|
|
|
|
|
tracing = "0.1.40"
|
2025-02-09 10:52:01 -05:00
|
|
|
thiserror = "2.0.11"
|
2024-07-16 09:03:21 -04:00
|
|
|
tokio = ">= 1.37.0"
|
2024-11-07 13:55:29 -05:00
|
|
|
tokio-util = { features = ["io-util"], version = "0.7.10" }
|
2024-07-16 09:03:21 -04:00
|
|
|
|
2023-01-18 17:39:03 -05:00
|
|
|
# See https://github.com/coreos/cargo-vendor-filterer
|
|
|
|
|
[workspace.metadata.vendor-filter]
|
2023-05-23 16:05:55 -04:00
|
|
|
# For now we only care about tier 1+2 Linux. (In practice, it's unlikely there is a tier3-only Linux dependency)
|
|
|
|
|
platforms = ["*-unknown-linux-gnu"]
|
|
|
|
|
tier = "2"
|
2023-01-18 17:39:03 -05:00
|
|
|
all-features = true
|
|
|
|
|
exclude-crate-paths = [ { name = "libz-sys", exclude = "src/zlib" },
|
|
|
|
|
{ name = "libz-sys", exclude = "src/zlib-ng" },
|
|
|
|
|
# rustix includes pre-generated assembly for linux_raw, which we don't use
|
|
|
|
|
{ name = "rustix", exclude = "src/imp/linux_raw" },
|
|
|
|
|
# Test files that include binaries
|
|
|
|
|
{ name = "system-deps", exclude = "src/tests" },
|
2023-09-26 10:30:40 -04:00
|
|
|
# This stuff is giant, trim unused versions
|
2023-09-08 13:03:56 -04:00
|
|
|
{ name = "k8s-openapi", exclude = "src/v1_25" },
|
|
|
|
|
{ name = "k8s-openapi", exclude = "src/v1_27" },
|
2023-01-18 17:39:03 -05:00
|
|
|
]
|
2024-07-17 13:31:07 -04:00
|
|
|
|
2025-01-03 13:08:06 -05:00
|
|
|
# This is an made up key for external binary dependencies.
|
|
|
|
|
# setpriv is a proxy for util-linux, and systemctl is a proxy for systemd.
|
|
|
|
|
[workspace.metadata.binary-dependencies]
|
2025-06-30 13:40:36 -04:00
|
|
|
bins = ["skopeo", "podman", "ostree", "zstd", "setpriv", "systemctl", "chcon"]
|
2025-01-03 13:08:06 -05:00
|
|
|
|
2024-07-17 13:31:07 -04:00
|
|
|
[workspace.lints.rust]
|
|
|
|
|
# Require an extra opt-in for unsafe
|
|
|
|
|
unsafe_code = "deny"
|
|
|
|
|
# Absolutely must handle errors
|
|
|
|
|
unused_must_use = "forbid"
|
2024-09-18 11:33:00 -04:00
|
|
|
missing_docs = "deny"
|
|
|
|
|
missing_debug_implementations = "deny"
|
|
|
|
|
# Feel free to comment this one out locally during development of a patch.
|
|
|
|
|
dead_code = "deny"
|
2024-07-17 13:31:07 -04:00
|
|
|
|
|
|
|
|
[workspace.lints.clippy]
|
2024-11-18 23:16:57 +00:00
|
|
|
disallowed_methods = "deny"
|
2024-07-17 13:31:07 -04:00
|
|
|
# These should only be in local code
|
|
|
|
|
dbg_macro = "deny"
|
|
|
|
|
todo = "deny"
|
2024-07-24 12:18:53 -04:00
|
|
|
# These two are in my experience the lints which are most likely
|
|
|
|
|
# to trigger, and among the least valuable to fix.
|
|
|
|
|
needless_borrow = "allow"
|
|
|
|
|
needless_borrows_for_generic_args = "allow"
|