diff options
| author | Fuwn <[email protected]> | 2022-06-01 01:10:46 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-06-01 01:10:46 +0000 |
| commit | 93f3b8cb812532e0500e1ffec24ba9194a5827bb (patch) | |
| tree | 8ad54e5befdcad1d3b7a17f9e83c97af4de9c3ea | |
| parent | refactor(router): move router to seperate file (diff) | |
| download | windmark-0.1.15.tar.xz windmark-0.1.15.zip | |
docs(cargo): bump version0.1.15
Also, use the doc attribute to include the README automatically! Wish I
knew about this earlier!
| -rw-r--r-- | Cargo.toml | 2 | ||||
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | src/lib.rs | 92 |
3 files changed, 12 insertions, 88 deletions
@@ -2,7 +2,7 @@ [package] name = "windmark" -version = "0.1.14" +version = "0.1.15" authors = ["Fuwn <[email protected]>"] edition = "2021" description = "An elegant and highly performant async Gemini server framework" @@ -15,15 +15,15 @@ the modern age! # Cargo.toml [dependencies] -windmark = "0.1.14" +windmark = "0.1.15" tokio = { version = "0.2.4", features = ["full"] } # If you would like to use the built-in logger (recommended) -# windmark = { version = "0.1.14", features = ["logger"] } +# windmark = { version = "0.1.15", features = ["logger"] } # If you would like to use the built-in MIME dedection when `Success`-ing a file # (recommended) -# windmark = { version = "0.1.14", features = ["auto-deduce-mime"] } +# windmark = { version = "0.1.15", features = ["auto-deduce-mime"] } ``` ### Implement a Windmark server @@ -16,95 +16,19 @@ // Copyright (C) 2022-2022 Fuwn <[email protected]> // SPDX-License-Identifier: GPL-3.0-only -//! # Windmark -//! -//! [](https://crates.io/crates/windmark) -//! [](https://docs.rs/windmark) -//! [](https://github.com/gemrest/windmark/actions/workflows/check.yaml) -//! -//! Windmark is an elegant and highly performant, async Gemini server framework -//! for the modern age! -//! -//! ## Usage -//! -//! ### Add Windmark as a dependency -//! -//! ```toml -//! # Cargo.toml -//! -//! [dependencies] -//! windmark = "0.1.14" -//! tokio = { version = "0.2.4", features = ["full"] } -//! -//! # If you would like to use the built-in logger (recommended) -//! # windmark = { version = "0.1.14", features = ["logger"] } -//! -//! # If you would like to use the built-in MIME dedection when `Success`-ing a file -//! # (recommended) -//! # windmark = { version = "0.1.14", features = ["auto-deduce-mime"] } -//! ``` -//! -//! ### Implement a Windmark server -//! -//! ```rust -//! // src/main.rs -//! -//! use windmark::Response; -//! -//! #[windmark::main] -//! fn main() -> Result<(), Box<dyn std::error::Error>> { -//! windmark::Router::new() -//! .set_private_key_file("windmark_private.pem") -//! .set_certificate_chain_file("windmark_public.pem") -//! .mount("/", Box::new(|_| Response::Success("Hello, World!".into()))) -//! .set_error_handler(Box::new(|_| { -//! Response::PermanentFailure("This route does not exist!".into()) -//! })) -//! .run() -//! .await -//! } -//! ``` -//! -//! ## Examples -//! -//! Examples can be found within the -//! [`examples/`](https://github.com/gemrest/windmark/tree/main/examples) directory. -//! -//! An example of a fully featured Gemini capsule written using Windmark can be -//! found [here](https://github.com/gemrest/locus). This example Gemini capsule also -//! happens to be the source code for [Fuwn's](https://github.com/Fuwn) (this -//! library's author) personal Gemini capsule! -//! -//! ## Modules -//! -//! Modules are reusable extensions which can be procedurally mounted onto -//! Windmark routers. -//! -//! [Add yours!](https://github.com/gemrest/windmark/edit/main/README.md) -//! -//! - [Windmark Comments](https://github.com/gemrest/windmark-comments) -//! -//! ## Capsules using Windmark -//! -//! [Add yours!](https://github.com/gemrest/windmark/edit/main/README.md) -//! -//! - <https://fuwn.me/> -//! -//! ## License -//! -//! This project is licensed with the -//! [GNU General Public License v3.0](https://github.com/gemrest/windmark/blob/main/LICENSE). - #![feature(once_cell, fn_traits)] #![deny( - warnings, - nonstandard_style, - unused, + clippy::all, + clippy::nursery, + clippy::pedantic, future_incompatible, + nonstandard_style, rust_2018_idioms, - unsafe_code + unsafe_code, + unused, + warnings )] -#![deny(clippy::all, clippy::nursery, clippy::pedantic)] +#![doc = include_str!("../README.md")] #![recursion_limit = "128"] pub mod handler; |