#http #route #router

rouste

Generic and declarative URI based router written with insane Rust macros

10 releases

0.2.1 Sep 13, 2018
0.2.0 Sep 12, 2018
0.1.7 Sep 12, 2018

#53 in HTTP server

Download history 11/week @ 2018-10-21 2/week @ 2018-10-28 53/week @ 2018-11-04 40/week @ 2018-11-11 21/week @ 2018-11-18 12/week @ 2018-11-25 68/week @ 2018-12-02 14/week @ 2018-12-09 20/week @ 2018-12-16 36/week @ 2018-12-23 41/week @ 2018-12-30 1/week @ 2019-01-06 22/week @ 2019-01-13

110 downloads per month

MIT license

12KB
176 lines

What is it?

Rouste is a generic and declarative way of writing a URL based router with insane Rust macros.

See documentation at crates.io.


lib.rs:

Rouste is a generic and declarative way of writing a URL based router with insane Rust macros. This can be achieved with the help of two macros: route! and route_with!. The former generate a function that tries to match the URL from a pattern, capture data from it and execute a function that computes the response for this route. The latter combines several routes in a router.

Rouste is generic in the sense that a every route of a router can capture different values from the URL and that a router can return any type of value.

Usage:

#[macro_use] extern crate rouste;
use rouste::utils::*;

No runtime deps