aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rossweisse/Cargo.toml1
-rw-r--r--rossweisse/README.md47
2 files changed, 48 insertions, 0 deletions
diff --git a/rossweisse/Cargo.toml b/rossweisse/Cargo.toml
index dd86d13..20cca61 100644
--- a/rossweisse/Cargo.toml
+++ b/rossweisse/Cargo.toml
@@ -7,6 +7,7 @@ authors = ["Fuwn <[email protected]>"]
edition = "2021"
description = "`struct`-based Router Framework for Windmark"
documentation = "https://docs.rs/rossweisse"
+readme = "README.md"
repository = "https://github.com/gemrest/windmark"
license = "GPL-3.0-only"
keywords = ["gemini", "windmark"]
diff --git a/rossweisse/README.md b/rossweisse/README.md
new file mode 100644
index 0000000..be7a4b5
--- /dev/null
+++ b/rossweisse/README.md
@@ -0,0 +1,47 @@
+# Rossweisse
+
+`struct`-based Router Framework for [Windmark](https://github.com/gemrest/windmark)
+
+## Usage
+
+Rossweisse is in it's infancy, and a much comprehensive interface is planned.
+
+For now, a simple Rosswiesse router can be implemented like this:
+
+```rust
+use rossweisse::route;
+
+#[rossweisse::router]
+struct Router {
+ _phantom: (),
+}
+
+#[rossweisse::router]
+impl Router {
+ #[route]
+ pub fn index(
+ _context: windmark::context::RouteContext,
+ ) -> windmark::Response {
+ windmark::Response::success("Hello, World!")
+ }
+}
+
+#[windmark::main]
+async fn main() -> Result<(), Box<dyn std::error::Error>> {
+ {
+ let mut router = Router::new();
+
+ router.router().set_private_key_file("windmark_private.pem");
+ router.router().set_certificate_file("windmark_public.pem");
+
+ router
+ }
+ .run()
+ .await
+}
+```
+
+## License
+
+This project is licensed with the
+[GNU General Public License v3.0](https://github.com/gemrest/windmark/blob/main/LICENSE).