Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/blakewilliams/straw
- Owner: BlakeWilliams
- License: mit
- Created: 2016-01-24T20:14:57.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-31T19:26:46.000Z (almost 9 years ago)
- Last Synced: 2024-09-18T09:09:51.654Z (4 months ago)
- Language: Rust
- Size: 9.77 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```