Crates.io | windmark |
lib.rs | windmark |
version | 0.4.0 |
created_at | 2022-03-25 07:21:47.212349+00 |
updated_at | 2025-07-08 06:16:30.919334+00 |
description | An elegant and highly performant async Gemini server framework |
homepage | https://github.com/gemrest/windmark |
repository | https://github.com/gemrest/windmark |
max_upload_size | |
id | 556108 |
size | 176,990 |
Windmark is an elegant and highly performant async Gemini server framework for the modern age!
Now supporting both Tokio and async-std
!
[!NOTE] A macro-based "
struct
-router" is in active development as a simplified alternative to the standard server creation approach. Check out Rossweisse for more information!
Feature | Description |
---|---|
default |
Base Windmark framework using Tokio |
logger |
Enables the default pretty_env_logger integration |
auto-deduce-mime |
Exposes Response s and macros that automatically fill MIMEs for non-Gemini responses |
response-macros |
Simple macros for all Response s |
tokio |
Marks Tokio as the asynchronous runtime |
async-std |
Marks async-std as the asynchronous runtime |
prelude |
Exposes the prelude module containing the most used Windmark features |
# Cargo.toml
[dependencies]
windmark = "0.4.0"
tokio = { version = "1.26.0", features = ["full"] }
# If you would like to use the built-in logger (recommended)
# windmark = { version = "0.4.0", features = ["logger"] }
# If you would like to use the built-in MIME deduction when `Success`-ing a file
# (recommended)
# windmark = { version = "0.4.0", features = ["auto-deduce-mime"] }
# If you would like to use macro-based responses (as seen below)
# windmark = { version = "0.4.0", features = ["response-macros"] }
// src/main.rs
use windmark::response::Response;
#[windmark::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
windmark::router::Router::new()
.set_private_key_file("windmark_private.pem")
.set_certificate_file("windmark_public.pem")
.mount("/", |_| Response::success("Hello, World!"))
.set_error_handler(|_|
Response::permanent_failure("This route does not exist!")
)
.run()
.await
}
// src/main.rs
use windmark::response::Response;
#[rossweisse::router]
struct Router;
#[rossweisse::router]
impl Router {
#[rossweisse::route(index)]
pub fn index(
_context: windmark::context::RouteContext,
) -> Response {
Response::success("Hello, World!")
}
}
// ...
Examples can be found within the
examples/
directory
along with a rundown of each of their purposes and useful facts.
Run an example by cloning this repository and running cargo run --example example_name
.
Modules are composable extensions which can be procedurally mounted onto Windmark routers.
/smiley
route, returning an 😀 emojiThis project is licensed with the GNU General Public License v3.0.