https://github.com/w-lfpup/coyote-rs
build html with html in rust
https://github.com/w-lfpup/coyote-rs
components html rust templates xml
Last synced: 24 days ago
JSON representation
build html with html in rust
- Host: GitHub
- URL: https://github.com/w-lfpup/coyote-rs
- Owner: w-lfpup
- License: bsd-3-clause
- Created: 2024-03-29T07:54:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-17T02:35:53.000Z (6 months ago)
- Last Synced: 2026-01-17T14:41:02.571Z (5 months ago)
- Topics: components, html, rust, templates, xml
- Language: Rust
- Homepage:
- Size: 291 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Coyote-rs
Create `HTML` documents in Rust.
HTML in, HTML out.
No suprises, no dependencies.
[](https://github.com/w-lfpup/coyote-rs/actions/workflows/tests.yml)
## Install
`Coyote-rs` is available on [crates.io](https://crates.io/crates/coyotes) as `coyotes`:
```sh
cargo add coyotes
```
Or add directly from git:
```sh
cargo add --git https://github.com/w-lfpup/coyote-rs
```
## Components
Create document fragments with coyote [components](./components.md).
```rust
use coyotes::{Component, tmpl};
fn hello_world() -> Component {
tmpl("
hai :3
", [])
}
```
## Document builders
Render `html` with [document builders](./document_builders.md).
```rust
use coyotes::Html;
let html = Html::new();
if let Ok(document) = html.render(&hello_world()) {
println!("{}", document);
};
```
The output will be:
```html
hai :3
```
## Spaces
`Coyote` never spaces or new lines. So what you write is what you get, breaking spaces and all.
Learn more about how `coyote` handles [spacing](./spacing.md).
## License
`Coyote-rs` is released under the BSD 3-Clause License.