An open API service indexing awesome lists of open source software.

https://github.com/wolfpup-software/coyote-rs

create documents with component functions
https://github.com/wolfpup-software/coyote-rs

components html rust templates xml xml-parser

Last synced: over 1 year ago
JSON representation

create documents with component functions

Awesome Lists containing this project

README

          

# Coyote-rs

Create `HTML` with function components in Rust.

There are no dependencies. There are no macros.

## Install

```sh
cargo install --git https://github.com/wolf-pup/coyote-rs
```

## Components

Create documents with coyote [components](./components.md).

```rust
use coyote::{Component, tmpl};

fn hai() -> Component {
tmpl("

hai :3

", [])
}
```

## Html

Render components as `html` with [document builders](./document_builders.md).

```rust
use coyote::{Component, Html, tmpl};

fn hai() -> Component {
tmpl("

hai :3

", [])
}

fn main() {
let hello_world = hai();
let html = Html::new();

if let Ok(document) = html.build(&hello_world) {
println!("{}", document);
};
}
```

The output will be:
```html

hai :3


```

## License

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