malvolio

Crates.iomalvolio
lib.rsmalvolio
version0.4.1
sourcesrc
created_at2021-01-14 10:17:56.055192
updated_at2022-08-25 11:15:35.345282
descriptionA library for programmatically generating HTML.
homepagehttps://github.com/puck-rs/malvolio
repositoryhttps://github.com/puck-rs/malvolio
max_upload_size
id341841
size107,563
Teymour Aldridge (teymour-aldridge)

documentation

README

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.

License

Malvolio is licensed under the BSD 3-Clause license - a copy of which may be found in the LICENSE file in the repository root, currently at https://github.com/puck-rs/malvolio.

At your option, the program is also licensed under the terms of the Apache 2.0 software license - details as to where the license can be located can be found in the aforementioned repository root, in the file APACHE-2.0.

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.
Commit count: 52

cargo fmt