Skip to content

w-lfpup/coyote-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coyote-rs

Create HTML documents with function components in Rust.

There are no dependencies. There are no macros.

Install

cargo install --git https://github.com/w-lfpup/coyote-rs

Components

Create document fragments with coyote components.

use coyote::{Component, tmpl};

fn hai() -> Component {
    tmpl("<p>hai :3</p>", [])
}

Html

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>

License

Coyote-rs is released under the BSD 3-Clause License.

About

build html with component functions in rust

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages