Registry / other / stretch

stretch

JSON →
library0.3.2rscratesunverified

High performance and cross-platform Flexbox implementation in Rust.

# Cargo.toml [dependencies] stretch = "0.3.2"
INSTALL
IMPORT
SIG · STRETCH
S
stretch
otherrustv0.3.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Stretch
use stretch::Stretch;

Create a Flexbox layout and compute positions.

use stretch::Stretch; use stretch::style::*; fn main() { let mut stretch = Stretch::new(); let child = stretch.new_node(Style::default(), vec![]).unwrap(); let parent = stretch.new_node( Style { size: Size { width: Dimension::Points(100.0), height: Dimension::Points(100.0) }, ..Default::default() }, vec![child], ).unwrap(); stretch.compute_layout(parent, Size::undefined()).unwrap(); println!("{:?}", stretch.layout(child).unwrap().location); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.3.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
stretch — cargo add stretch · libregistry