Create HTML
documents with function components in Rust.
There are no dependencies. There are no macros.
cargo install --git https://github.com/w-lfpup/coyote-rs
Create document fragments with coyote components.
use coyote::{Component, tmpl};
fn hai() -> Component {
tmpl("<p>hai :3</p>", [])
}
Render components as html
with document builders.
use coyote::{Component, Html, tmpl};
fn hai() -> Component {
tmpl("<p>hai :3</p>", [])
}
fn main() {
let hello_world = hai();
let html = Html::new();
if let Ok(document) = html.build(&hello_world) {
println!("{}", document);
};
}
The output will be:
<p>hai :3</p>
Coyote-rs
is released under the BSD 3-Clause License.