Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/blakewilliams/straw

WIP progress Rust -> HTML largely as a learning exercise
https://github.com/blakewilliams/straw

Last synced: 2 months ago
JSON representation

WIP progress Rust -> HTML largely as a learning exercise

Awesome Lists containing this project

README

        

# Straw

Work in progress Experimental Rust -> HTML renderer.

## Installation

Add straw to `Cargo.toml`.

```toml
[dependencies]
straw = "*"
```

## Usage

Import `Element` and `Renderable` and start creating `Element`s.

```rust
extern crate straw;

use straw::element::{Element, Renderable}
use straw::attribute::Attr;

let element = Element::new("div", vec![Attr::id("main")], vec![
Element::new("h1", vec![], "Hello"),
Element::new("input", vec![Attr::disabled(true)], ""),
]);

element.render(); //

Hello


```