Add cargo-hakari

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2025-03-04 11:42:31 +01:00
parent a894c4c413
commit ac995ea522
8 changed files with 59 additions and 1 deletions

27
.config/hakari.toml Normal file
View file

@ -0,0 +1,27 @@
# This file contains settings for `cargo hakari`.
# See https://docs.rs/cargo-hakari/latest/cargo_hakari/config for a full list of options.
hakari-package = "hakari"
# Format version for hakari's output. Version 4 requires cargo-hakari 0.9.22 or above.
dep-format-version = "4"
# Setting workspace.resolver = "2" or higher in the root Cargo.toml is HIGHLY recommended.
# Hakari works much better with the v2 resolver. (The v2 and v3 resolvers are identical from
# hakari's perspective, so you're welcome to set either.)
#
# For more about the new feature resolver, see:
# https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver
resolver = "2"
# Add triples corresponding to platforms commonly used by developers here.
# https://doc.rust-lang.org/rustc/platform-support.html
platforms = [
# "x86_64-unknown-linux-gnu",
# "x86_64-apple-darwin",
# "aarch64-apple-darwin",
# "x86_64-pc-windows-msvc",
]
# Write out exact versions rather than a semver range. (Defaults to false.)
# exact-versions = true

4
Cargo.lock generated
View file

@ -510,6 +510,10 @@ dependencies = [
"regex-syntax",
]
[[package]]
name = "hakari"
version = "0.1.0"
[[package]]
name = "hashbrown"
version = "0.15.2"

View file

@ -1,3 +1,3 @@
[workspace]
members = [ "lints/*" ]
members = [ "hakari" , "lints/*" ]

View file

@ -47,6 +47,8 @@
nativeBuildInputs = [
rustTarget
dylint
pkgs.cargo-hakari
];
};
}

4
hakari/.gitattributes vendored Normal file
View file

@ -0,0 +1,4 @@
# Avoid putting conflict markers in the generated Cargo.toml file, since their presence breaks
# Cargo.
# Also do not check out the file as CRLF on Windows, as that's what hakari needs.
Cargo.toml merge=binary -crlf

18
hakari/Cargo.toml Normal file
View file

@ -0,0 +1,18 @@
# This file is generated by `cargo hakari`.
# To regenerate, run:
# cargo hakari generate
[package]
name = "hakari"
version = "0.1.0"
edition = "2021"
description = "workspace-hack package, managed by hakari"
# You can choose to publish this crate: see https://docs.rs/cargo-hakari/latest/cargo_hakari/publishing.
publish = false
# The parts of the file between the BEGIN HAKARI SECTION and END HAKARI SECTION comments
# are managed by hakari.
### BEGIN HAKARI SECTION
### END HAKARI SECTION

2
hakari/build.rs Normal file
View file

@ -0,0 +1,2 @@
// A build script is required for cargo to consider build dependencies.
fn main() {}

1
hakari/src/lib.rs Normal file
View file

@ -0,0 +1 @@
// This is a stub lib.rs.