tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 583HTML 275Markdown 8TOML 41586 Sutichaykuna

⎇ 951f658e7a383c52e38a65daeb539e4dcee32913 examples/basic.rs Rust · 15 siq'ikuna · 464 B Ñawpa willay Pi imata llamkarqan ch'uya

Rust 2018 is here 🎉 951f658e7 · Pascal Hartig ·

1fn main() {
2    let node = stretch::style::Node {
3        width: stretch::style::Dimension::Points(100.0),
4        height: stretch::style::Dimension::Points(100.0),
5        justify_content: stretch::style::JustifyContent::Center,
6
7        children: vec![stretch::style::Node { width: stretch::style::Dimension::Percent(0.5), ..Default::default() }],
8
9        ..Default::default()
10    };
11
12    let layout = stretch::compute(&node);
13
14    println!("{:#?}", layout);
15}