diff --git a/.config/hakari.toml b/.config/hakari.toml new file mode 100644 index 0000000..2cb2d81 --- /dev/null +++ b/.config/hakari.toml @@ -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 diff --git a/Cargo.lock b/Cargo.lock index 830f23c..f787eb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -510,6 +510,10 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "hakari" +version = "0.1.0" + [[package]] name = "hashbrown" version = "0.15.2" diff --git a/Cargo.toml b/Cargo.toml index 9bbdea1..9613345 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,3 @@ [workspace] -members = [ "lints/*" ] +members = [ "hakari" , "lints/*" ] diff --git a/flake.nix b/flake.nix index 8c73fa6..5d416d5 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,8 @@ nativeBuildInputs = [ rustTarget dylint + + pkgs.cargo-hakari ]; }; } diff --git a/hakari/.gitattributes b/hakari/.gitattributes new file mode 100644 index 0000000..3e9dba4 --- /dev/null +++ b/hakari/.gitattributes @@ -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 diff --git a/hakari/Cargo.toml b/hakari/Cargo.toml new file mode 100644 index 0000000..8078f36 --- /dev/null +++ b/hakari/Cargo.toml @@ -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 diff --git a/hakari/build.rs b/hakari/build.rs new file mode 100644 index 0000000..92518ef --- /dev/null +++ b/hakari/build.rs @@ -0,0 +1,2 @@ +// A build script is required for cargo to consider build dependencies. +fn main() {} diff --git a/hakari/src/lib.rs b/hakari/src/lib.rs new file mode 100644 index 0000000..22489f6 --- /dev/null +++ b/hakari/src/lib.rs @@ -0,0 +1 @@ +// This is a stub lib.rs.