5 releases (3 breaking)

Uses new Rust 2021

0.4.0 Aug 4, 2022
0.3.1 Jul 12, 2021
0.3.0 Jul 9, 2021
0.2.0 Jan 23, 2021
0.1.0 Jan 14, 2021

#32 in Template engine

Download history 20/week @ 2022-04-24 24/week @ 2022-05-01 22/week @ 2022-05-08 87/week @ 2022-05-15 27/week @ 2022-05-22 41/week @ 2022-05-29 34/week @ 2022-06-05 29/week @ 2022-06-12 11/week @ 2022-06-19 2/week @ 2022-06-26 7/week @ 2022-07-03 14/week @ 2022-07-10 12/week @ 2022-07-17 11/week @ 2022-07-24 30/week @ 2022-07-31 6/week @ 2022-08-07

59 downloads per month

MPL-2.0 license

125KB
3K SLoC

Malvolio

Malvolio is a library with a "builder-syntax" for creating complex HTML documents.

Unlike "JSX" style solutions, Malvolio avoids climbing out what has been described as the "macro escape hatch" [1]. This means that you get good editor support, automatic code formatting, and easier refactoring.

Usage

Malvolio should be relatively simple to use.

A quick couple of examples (see the examples and documentation section lower down for more details):

malvolio::prelude::Form::new()
    .attribute(Method::Post)
    .child(
        Input::default()
            .attribute(Type::Text)
            .attribute(Name::new("invited-user-identifier")),
    )
    .child(
        Input::default()
            .attribute(Type::Submit)
            .attribute(Value::new("Invite teacher!")),
    )

Documentation

Malvolio has API docs which are hosted on docs.rs.

Semver

Malvolio follows semantic versioning.

For pre-1.0.0 versions we make the following guarantees. If the previous release has version 0.x.y, then the next release will have version

  • 0.x+1.0 if and only if there was a breaking change
  • 0.x.y+1 if and only if the changes made were not breaking.

Dependencies

~2.7–8MB
~168K SLoC