From 9ad87888a9a3e08daeb86fc81f54da5b09dbb9a6 Mon Sep 17 00:00:00 2001 From: yavko Date: Fri, 31 Mar 2023 19:18:26 -0700 Subject: [PATCH] Improve metadata for `hyprland-macros` --- Cargo.lock | 2 +- Cargo.toml | 23 ++++++++++++++++------- hyprland-macros/Cargo.toml | 10 ++++++---- hyprland-macros/README.md | 2 ++ hyprland-macros/src/lib.rs | 4 ++++ 5 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 hyprland-macros/README.md diff --git a/Cargo.lock b/Cargo.lock index 62e91b5..754c20e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -449,7 +449,7 @@ dependencies = [ [[package]] name = "hyprland-macros" -version = "0.1.0" +version = "0.3.1" dependencies = [ "quote", "syn 2.0.12", diff --git a/Cargo.toml b/Cargo.toml index d40b459..0b70943 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "hyprland" -version = "0.3.1" edition = "2021" -authors = ["yavko "] -license = "GPL-3.0-or-later" -keywords = ["hyprland", "ipc", "hypr", "wayland", "linux"] -categories = ["api-bindings"] readme = "README.md" description = "A unoffical rust wrapper for hyprland's IPC" homepage = "https://github.com/hyprland-community/hyprland-rs" -repository = "https://github.com/hyprland-community/hyprland-rs" +version.workspace = true +license.workspace = true +author.workspace = true +repository.workspace = true +keywords.workspace = true +categories.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [package.metadata.nix] @@ -23,8 +23,17 @@ lto = true [workspace] members = ["hyprland-macros"] +[workspace.package] +version = "0.3.1" +license = "GPL-3.0-or-later" +repository = "https://github.com/hyprland-community/hyprland-rs" +keywords = ["hyprland", "ipc", "hypr", "wayland", "linux"] +categories = ["api-bindings"] +authors = ["yavko "] + + [dependencies] -hyprland-macros = { path = "./hyprland-macros/" } +hyprland-macros = { path = "hyprland-macros", version = "0.3.1" } serde = {version = "1", features = ["derive"]} serde_json = "1" serde_repr = "0.1" diff --git a/hyprland-macros/Cargo.toml b/hyprland-macros/Cargo.toml index cf78338..d7dc5e1 100644 --- a/hyprland-macros/Cargo.toml +++ b/hyprland-macros/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "hyprland-macros" -version = "0.1.0" +description = "Macros used in hyprland-rs" +version.workspace = true +license.workspace = true +readme = "README.md" edition = "2021" +homepage = "https://github.com/hyprland-community/hyprland-rs/tree/master/hyprland-macros" [package.metadata.nix] build = true -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [lib] proc-macro = true [dependencies] -syn = "2" +syn = { version = "2", features = ["full", "parsing"]} quote = "1" diff --git a/hyprland-macros/README.md b/hyprland-macros/README.md new file mode 100644 index 0000000..39e3fb0 --- /dev/null +++ b/hyprland-macros/README.md @@ -0,0 +1,2 @@ +# Hyprland Macros +Literally only async closure macro lol diff --git a/hyprland-macros/src/lib.rs b/hyprland-macros/src/lib.rs index 905d3b4..7bb974b 100644 --- a/hyprland-macros/src/lib.rs +++ b/hyprland-macros/src/lib.rs @@ -1,7 +1,11 @@ +#![doc = include_str!("../README.md")] +#![deny(missing_docs)] + use proc_macro::TokenStream; use quote::quote; use syn::{parse_macro_input, ExprClosure}; +/// Creates a async closure #[proc_macro] pub fn async_closure(input: TokenStream) -> TokenStream { let input = parse_macro_input!(input as ExprClosure);