From 01beea4ec5f1371d09ebde1cfbda19e75d6b3689 Mon Sep 17 00:00:00 2001 From: Jakob Ankarhem Date: Fri, 24 Apr 2026 15:59:07 +0200 Subject: [PATCH 1/2] chore: harden build configuration and dev tooling - Derive version in flake.nix from Cargo.toml (single source of truth) - Add rust-version = "1.85" to Cargo.toml (MSRV for edition 2024) - Remove unused openssl, pkg-config, and nodejs overlay from flake.nix - Add cargo-nextest to dev shell for faster test runs - Add [sources] section to deny.toml (deny unknown registries/git) - Add .rustfmt.toml with explicit edition 2024 settings - Extend .gitignore with coverage, profiling, and backup entries --- .gitignore | 4 ++++ .rustfmt.toml | 4 ++++ Cargo.toml | 1 + deny.toml | 4 ++++ flake.nix | 6 ++---- 5 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 .rustfmt.toml diff --git a/.gitignore b/.gitignore index ac76e0c..ced05ee 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,7 @@ .sisyphus/ result .idea/ +**/*.rs.bk +coverage/ +*.profraw +.env diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 0000000..4dc525d --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1,4 @@ +edition = "2024" +max_width = 100 +use_field_init_shorthand = true +use_try_shorthand = true diff --git a/Cargo.toml b/Cargo.toml index 35b1fc0..dd0e568 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "graylog-cli" version = "0.0.3-alpha" edition = "2024" +rust-version = "1.85" publish = false [dependencies] diff --git a/deny.toml b/deny.toml index 41ca800..0e0a438 100644 --- a/deny.toml +++ b/deny.toml @@ -25,3 +25,7 @@ confidence-threshold = 0.9 # ships as a binary via GitHub Releases, not to crates.io, so it has no # project license and cargo-deny should skip license checks for it. ignore = true + +[sources] +unknown-registry = "deny" +unknown-git = "deny" diff --git a/flake.nix b/flake.nix index 1d4150e..48ff31b 100644 --- a/flake.nix +++ b/flake.nix @@ -36,7 +36,7 @@ }: let pname = "graylog-cli"; - version = "0.0.3-alpha"; + version = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).package.version; commonArgs = { inherit pname version; src = self; @@ -98,8 +98,7 @@ cargo-edit cargo-watch cargo-wizard - openssl - pkg-config + cargo-nextest rust-analyzer ] ++ config.pre-commit.settings.enabledPackages; @@ -114,7 +113,6 @@ }; }; flake.overlays.default = final: prev: { - nodejs = final.nodejs_24; rustToolchain = with inputs.fenix.packages.${prev.stdenv.hostPlatform.system}; combine ( From 49a1797f391740dccda94268319e845188060eb2 Mon Sep 17 00:00:00 2001 From: Jakob Ankarhem Date: Mon, 27 Apr 2026 08:21:28 +0200 Subject: [PATCH 2/2] remove rust-version --- Cargo.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dd0e568..4c6f08c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,6 @@ name = "graylog-cli" version = "0.0.3-alpha" edition = "2024" -rust-version = "1.85" publish = false [dependencies] @@ -11,7 +10,10 @@ clap = { version = "4.6", features = ["derive"] } dirs = "6" exn = "0.3" humantime = "2" -reqwest = { version = "0.13", default-features = false, features = ["json", "rustls"] } +reqwest = { version = "0.13", default-features = false, features = [ + "json", + "rustls", +] } secrecy = { version = "0.10", features = ["serde"] } self-replace = "1" semver = "1"