Created
May 6, 2019 21:22
-
-
Save traverseda/425ab710e12f8368cfcd967eb1c7523d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src | |
├── build.rs | |
├── main.rs | |
└── schema | |
└── baseComponents.capnp | |
1 directory, 3 files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate stretch; | |
use stretch::{style::*, node::Node, geometry::Size}; | |
extern crate capnp; | |
use capnp::Error; | |
use capnp::primitive_list; | |
extern crate capnp_rpc; | |
use capnp_rpc::{RpcSystem, twoparty, rpc_twoparty_capnp}; | |
use schema::baseComponents_capnp::Properties; | |
use capnp::capability::Promise; | |
fn main() { | |
let node = Node::new(Style { | |
size: Size { | |
width: Dimension::Points(100.0), | |
height: Dimension::Points(100.0), | |
}, | |
..Default::default() | |
}, vec![]); | |
let layout = node.compute_layout(Size::undefined()); | |
dbg!(layout); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment