🏗️ Elegant & Highly Performant Async Gemini Server Framework for the Modern Age
async framework gemini-protocol protocol gemini rust
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: improve macro hygiene

Fuwn 513705a7 c360d1d7

+19 -19
+1 -1
Cargo.toml
··· 2 2 3 3 [package] 4 4 name = "windmark" 5 - version = "0.3.4" 5 + version = "0.3.5" 6 6 authors = ["Fuwn <contact@fuwn.me>"] 7 7 edition = "2021" 8 8 description = "An elegant and highly performant async Gemini server framework"
+4 -4
README.md
··· 18 18 # Cargo.toml 19 19 20 20 [dependencies] 21 - windmark = "0.3.4" 21 + windmark = "0.3.5" 22 22 tokio = { version = "1.26.0", features = ["full"] } 23 23 24 24 # If you would like to use the built-in logger (recommended) 25 - # windmark = { version = "0.3.4", features = ["logger"] } 25 + # windmark = { version = "0.3.5", features = ["logger"] } 26 26 27 27 # If you would like to use the built-in MIME dedection when `Success`-ing a file 28 28 # (recommended) 29 - # windmark = { version = "0.3.4", features = ["auto-deduce-mime"] } 29 + # windmark = { version = "0.3.5", features = ["auto-deduce-mime"] } 30 30 31 31 # If you would like to use macro-based responses (as seen below) 32 - # windmark = { version = "0.3.4", features = ["response-macros"] } 32 + # windmark = { version = "0.3.5", features = ["response-macros"] } 33 33 ``` 34 34 35 35 ### Implement a Windmark server
+14 -14
src/response/macros.rs
··· 23 23 #[macro_export] 24 24 macro_rules! $name { 25 25 ($body:expr /* $(,)? */) => { 26 - |_: ::windmark::context::RouteContext| ::windmark::Response::$name($body) 26 + |_: $crate::context::RouteContext| $crate::Response::$name($body) 27 27 }; 28 28 ($context:ident, $body:expr /* $(,)? */) => { 29 - |$context: ::windmark::context::RouteContext| ::windmark::Response::$name($body) 29 + |$context: $crate::context::RouteContext| $crate::Response::$name($body) 30 30 }; 31 31 } 32 32 )* ··· 40 40 #[macro_export] 41 41 macro_rules! [< $name _async >] { 42 42 ($body:expr /* $(,)? */) => { 43 - |_: ::windmark::context::RouteContext| async { ::windmark::Response::$name($body) } 43 + |_: $crate::context::RouteContext| async { $crate::Response::$name($body) } 44 44 }; 45 45 ($context:ident, $body:expr /* $(,)? */) => { 46 - |$context: ::windmark::context::RouteContext| async { ::windmark::Response::$name($body) } 46 + |$context: $crate::context::RouteContext| async { $crate::Response::$name($body) } 47 47 }; 48 48 } 49 49 })* ··· 86 86 #[macro_export] 87 87 macro_rules! binary_success { 88 88 ($body:expr, $mime:expr) => { 89 - |_: ::windmark::context::RouteContext| { 90 - ::windmark::Response::binary_success($body, $mime) 89 + |_: $crate::context::RouteContext| { 90 + $crate::Response::binary_success($body, $mime) 91 91 } 92 92 }; 93 93 ($body:expr) => {{ ··· 97 97 feature to be enabled" 98 98 ); 99 99 100 - |_: ::windmark::context::RouteContext| { 100 + |_: $crate::context::RouteContext| { 101 101 #[cfg(feature = "auto-deduce-mime")] 102 - return ::windmark::Response::binary_success_auto($body); 102 + return $crate::Response::binary_success_auto($body); 103 103 104 104 // Suppress item not found warning 105 105 #[cfg(not(feature = "auto-deduce-mime"))] 106 - ::windmark::Response::binary_success($body, "application/octet-stream") 106 + $crate::Response::binary_success($body, "application/octet-stream") 107 107 } 108 108 }}; 109 109 ($context:ident, $body:expr, $mime:expr) => { 110 - |$context: ::windmark::context::RouteContext| { 111 - ::windmark::Response::binary_success($body, $mime) 110 + |$context: $crate::context::RouteContext| { 111 + $crate::Response::binary_success($body, $mime) 112 112 } 113 113 }; 114 114 ($context:ident, $body:expr) => {{ ··· 118 118 feature to be enabled" 119 119 ); 120 120 121 - |$context: ::windmark::context::RouteContext| { 121 + |$context: $crate::context::RouteContext| { 122 122 #[cfg(feature = "auto-deduce-mime")] 123 - return ::windmark::Response::binary_success_auto($body); 123 + return $crate::Response::binary_success_auto($body); 124 124 125 125 // Suppress item not found warning 126 126 #[cfg(not(feature = "auto-deduce-mime"))] 127 - ::windmark::Response::binary_success($body, "application/octet-stream") 127 + $crate::Response::binary_success($body, "application/octet-stream") 128 128 } 129 129 }}; 130 130 }