#cgi #gemini #scgi

macro gemfra-codegen

A collection of macros for use with the gemfra crate

2 releases

0.1.0 Jan 6, 2023

#4 in #scgi

42 downloads per month
Used in gemfra

MIT license

10KB
101 lines

crates-io api-docs

A collection of macros for use with the gemfra crate

Some of the code involved with gemfra is too repetitive. This crate provides macros that can eliminate a lot of boilerplate involved in gemfra.


lib.rs:

Macros for gemfra

route macro

A macro that allows you to write routes for a RoutedApp.

use gemfra::{
    response::Response,
    request::Request,
    error::AnyError,
};
use gemfra_codegen::route;

#[route("/foo/:bar")]
async fn my_route(request: Request, bar: &str) -> Result<Response, AnyError> {
    todo!()
}

Dependencies

~1.5MB
~34K SLoC