From 5c262fe4258f464bb13021f3cfdf495caa704a28 Mon Sep 17 00:00:00 2001 From: Overlord Date: Fri, 16 Oct 2026 16:03:36 +0200 Subject: [PATCH] Initialize Rust project with essential configuration and dependencies. --- .cargo/config.toml | 5 +++++ .gitignore | 2 ++ Cargo.toml | 52 +++++++++++++++++++++++++++++++++++++++++++++ README.md | 3 ++- rust-toolchain.toml | 4 ++++ src/main.rs | 1 + 6 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 .cargo/config.toml create mode 100644 Cargo.toml create mode 100644 rust-toolchain.toml create mode 100644 src/main.rs diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..6b85386 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,5 @@ +[target.x86_64-unknown-linux-gnu] +linker = "clang" +rustflags = [ + "-C", "link-arg=-fuse-ld=mold", +] diff --git a/.gitignore b/.gitignore index d8b1fb5..44d0830 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .* !.git* +!.cargo* *.md !README.md @@ -10,3 +11,4 @@ target/ **/*.rs.bk *.pdb +*.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..f13e747 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,52 @@ +[package] +name = "keel" +version = "0.1.0" +edition = "2024" +description = "Pacman hook guard that blocks partial-upgrade ABI skew and rolls back broken updates via btrfs snapshots." +license = "AGPL-3.0-or-later" +publish = false + +[dependencies] +# pacman databases, versions and config, without libalpm +alpm-db = "0.3" +alpm-repo-db = "0.2" +alpm-types = "0.13" +pacmanconf = "3.1" + +object = { version = "0.40", default-features = false, features = ["read_core", "elf", "std"] } +tar = "0.4" +ruzstd = "0.9" + +anyhow = "1" +bincode = { version = "2", features = ["serde"] } +clap = { version = "4.6", features = ["derive"] } +serde = { version = "1", features = ["derive"] } +serde_json = "1" +toml = "1.1" +blake3 = "1.8" +rayon = "1.12" + +[profile.dev] +lto = false +opt-level = 0 +codegen-units = 256 +incremental = true +debug = true +debug-assertions = true +overflow-checks = true +panic = "unwind" +strip = "none" + +[profile.dev.package."*"] +opt-level = 2 + +[profile.release] +lto = "fat" +opt-level = 3 +codegen-units = 1 +incremental = false +debug = false +debug-assertions = false +overflow-checks = false +panic = "abort" +strip = "symbols" diff --git a/README.md b/README.md index 86d43e1..15aacab 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # keel -Pacman hook guard for Arch/CachyOS: blocks partial-upgrade ABI skew before it installs, and rolls back via snapper (GRUB, Limine) when an update breaks boot. \ No newline at end of file +Pacman hook guard for Arch/CachyOS: blocks partial-upgrade ABI skew before it installs, +and rolls back via snapper (GRUB, Limine) when an update breaks boot. diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..8df7852 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "stable" +components = ["clippy", "rustfmt"] +targets = ["x86_64-unknown-linux-musl"] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..f328e4d --- /dev/null +++ b/src/main.rs @@ -0,0 +1 @@ +fn main() {}