More Premium Hugo Themes Premium Html Themes

Horrorshow Rs

A macro-based html builder for rust

Horrorshow Rs

A macro-based html builder for rust

Author Avatar Theme by stebalien
Github Stars Github Stars: 332
Last Commit Last Commit: May 20, 2025 -
First Commit Created: Apr 29, 2023 -
default image

Overview

Horrorshow is a macro-based HTML templating library that is compatible with stable Rust. It requires Rust version 1.48 or higher. The library is designed to degrade gracefully when compiled without the standard library (std) or the allocation library (alloc).

Features

  • Degrades Gracefully: The crate can be compiled without std or alloc, and it will still function, albeit with some limitations.
  • Compatible with alloc: When compiled with alloc library, the Template::write_to_io() method is available for rendering templates to an output stream.
  • Compatible with core: When compiled with just the core library, the RenderBox type is not available, and only the Template::write_to_fmt() method for rendering templates to a formatted string is available.

Installation

To install the Horrorshow library, follow these steps:

  1. Ensure you have Rust version 1.48 or higher installed.
  2. Add horrorshow as a dependency in your Cargo.toml file:
    [dependencies]
    horrorshow = "version"
    
    Replace "version" with the desired version of the Horrorshow library.
  3. Run cargo build to download and build the library.

Summary

Horrorshow is a versatile macro-based HTML templating library for Rust. It provides a range of features and is compatible with different configurations of the standard library, allowing for flexible usage depending on the requirements of your project. With its ability to degrade gracefully, Horrorshow ensures that your templates can still be rendered even without certain dependencies.