🏗️ 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.

docs(readme): add rossweisse usage example

Fuwn ee4fa6ee bffe2c16

+35 -12
+34 -9
README.md
··· 17 17 18 18 ### Features 19 19 20 - | Feature | Description | 21 - | - | - | 22 - | `default` | Base Windmark framework using [Tokio](https://tokio.rs/) | 23 - | `logger` | Enables the default [`pretty_env_logger`](https://github.com/seanmonstar/pretty-env-logger) integration | 24 - | `auto-deduce-mime` | Exposes `Response`s and macros that automatically fill MIMEs for non-Gemini responses | 25 - | `response-macros` | Simple macros for all `Response`s | 26 - | `tokio` | Marks [Tokio](https://tokio.rs/) as the asynchronous runtime | 27 - | `async-std` | Marks [`async-std`](https://async.rs/) as the asynchronous runtime | 28 - | `prelude` | Exposes the `prelude` module containing the most used Windmark features | 20 + | Feature | Description | 21 + | ------------------ | ------------------------------------------------------------------------------------------------------- | 22 + | `default` | Base Windmark framework using [Tokio](https://tokio.rs/) | 23 + | `logger` | Enables the default [`pretty_env_logger`](https://github.com/seanmonstar/pretty-env-logger) integration | 24 + | `auto-deduce-mime` | Exposes `Response`s and macros that automatically fill MIMEs for non-Gemini responses | 25 + | `response-macros` | Simple macros for all `Response`s | 26 + | `tokio` | Marks [Tokio](https://tokio.rs/) as the asynchronous runtime | 27 + | `async-std` | Marks [`async-std`](https://async.rs/) as the asynchronous runtime | 28 + | `prelude` | Exposes the `prelude` module containing the most used Windmark features | 29 29 30 30 ### Add Windmark and Tokio as Dependencies 31 31 ··· 52 52 ```rust 53 53 // src/main.rs 54 54 55 + // ... 56 + 55 57 #[windmark::main] 56 58 async fn main() -> Result<(), Box<dyn std::error::Error>> { 57 59 windmark::router::Router::new() ··· 64 66 .run() 65 67 .await 66 68 } 69 + ``` 70 + 71 + ### Implement a Windmark server using Rossweisse 72 + 73 + ```rust 74 + // src/main.rs 75 + 76 + // ... 77 + 78 + #[rossweisse::router] 79 + struct Router; 80 + 81 + #[rossweisse::router] 82 + impl Router { 83 + #[route(index)] 84 + pub fn index( 85 + _context: windmark::context::RouteContext, 86 + ) -> Response { 87 + Response::success("Hello, World!") 88 + } 89 + } 90 + 91 + // ... 67 92 ``` 68 93 69 94 ## Examples
+1 -3
rossweisse/README.md
··· 13 13 use windmark::response::Response; 14 14 15 15 #[rossweisse::router] 16 - struct Router { 17 - _phantom: (), 18 - } 16 + struct Router; 19 17 20 18 #[rossweisse::router] 21 19 impl Router {