No description
When Rust and HTML syntax differ, Maud tends to side with Rust syntax. This can be seen with string literals, for example, where we use backslash escapes instead of HTML entities. Using `;` to terminate void elements is consistent with this idea. Moreover, this reduces confusion around the generated code. Maud does not insert an extra slash into the HTML output (as per the spec) but the syntax may imply otherwise. This confusion may have been the cause of a [bug I found in the wild][1], where the code omitted the trailing slash on an `input` element. I suspect that this is because the author thought that a trailing slash in the Maud template would lead to one in the HTML output. Switching to semicolons would prevent this misconception. [1]: https://github.com/anowell/quasar/pull/3 |
||
---|---|---|
benchmarks | ||
maud | ||
maud_extras | ||
maud_htmlescape | ||
maud_lints | ||
maud_macros | ||
.gitignore | ||
.travis.yml | ||
Cargo.toml | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
maud.png | ||
README.md |
maud

Documentation (source) • API reference • Change log
Maud is an HTML template engine for Rust. It's implemented as a macro, html!
, which compiles your markup to specialized Rust code. This unique approach makes Maud templates blazing fast, super type-safe, and easy to deploy.
Note that Maud depends on the unstable procedural macro API, and so requires the nightly version of Rust.
For more info on Maud, see the official book.
Stability
As of version 0.11, I am satisfied with the core syntax and semantics of the library. Development at this stage is focused on adding features and fixing bugs.
The underlying procedural macro API is still unstable though, so updating your compiler may break things. Please file an issue when this happens!