vy

Crates.iovy
lib.rsvy
version
sourcesrc
created_at2024-10-15 19:08:29.496998
updated_at2024-10-17 01:31:28.741166
descriptionFast and minimal HTML templating macros in Rust
homepage
repositoryhttps://github.com/JonahLund/vy
max_upload_size
id1409904
Cargo.toml error:TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Jonah Lund (jonahlund)

documentation

README

vy

crates.io docs.rs build license: MIT

Fast and minimal HTML templating macros in Rust.

Usage

vy::render! {
  <div>
    <h1>"This is awesome!"</h1>
    <img src="/sunrise.png" />
  </div>
}

Syntax

The parsing is done via tiny-rsx, with a very simple and minimal JSX-like syntax.

  • Rust expressions are interpreted with braces, e.g. <span>{1 + 2}</span>.
  • Text should always be quoted, e.g. <p>"My text"</p>.
  • Void tags should end with a forward slash, e.g. <br />.

Escaping

Escaping is opt-out, meaning values are escaped automatically unless you use PreEscaped(..).

Commit count: 23

cargo fmt