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-rsCreate document fragments with coyote components.
use coyote::{Component, tmpl};
fn hello_world() -> Component {
tmpl("<p>hai :3</p>", [])
}Render components as html with document builders.
use coyote::Html;
let html = Html::new();
if let Ok(document) = html.render(&hello_world()) {
println!("{}", document);
};The output will be:
<p>hai :3</p>Coyote-rs is released under the BSD 3-Clause License.