5 unstable releases

0.3.2 Jan 19, 2024
0.3.1 Jan 2, 2024
0.3.0 Dec 22, 2021
0.2.0 Aug 27, 2021
0.1.0 Jun 7, 2021

#31 in #trillium

Download history 29/week @ 2023-12-31 2/week @ 2024-01-14 10/week @ 2024-02-18 29/week @ 2024-02-25 1/week @ 2024-03-10 30/week @ 2024-03-31 6/week @ 2024-04-07 49/week @ 2024-04-14

85 downloads per month

MIT/Apache

63KB
885 lines

Welcome to Trillium!

📖 Guide 📖

The guide provides an architectural overview and lay of the land connecting the trillium crates.

📑 Rustdocs 📑

The rustdocs represent the best way to learn about any of trillium's individual crates and the specific interfaces.




Legal:

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

provides support for using the askama compile-time template library with trillium. see https://github.com/djc/askama for more information about using askama.

use trillium::Conn;
use trillium_askama::{AskamaConnExt, Template};

#[derive(Template)]
#[template(path = "examples/hello.html")]
struct HelloTemplate<'a> {
name: &'a str,
}

async fn handler(conn: Conn) -> Conn {
conn.render(HelloTemplate { name: "trillium" })
}

use trillium_testing::prelude::*;
assert_ok!(
get("/").on(&handler),
"Hello, trillium!",
"content-type" => "text/html"
);

Dependencies

~8MB
~206K SLoC