mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 07:18:04 +08:00
Restructure node graph project layout
This commit is contained in:
13
node-graph/gstd/src/main.rs
Normal file
13
node-graph/gstd/src/main.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
use graphene_core::{Exec, Node};
|
||||
use graphene_std::*;
|
||||
|
||||
fn main() {
|
||||
let int = value::IntNode::<32>;
|
||||
let _add: u32 = ops::AddNode::<u32>::default().eval((int.exec(), int.exec()));
|
||||
let fnode = generic::FnNode::new(|(a, b): &(i32, i32)| a - b);
|
||||
//let sub = fnode.any(&("a", 2));
|
||||
let cache = memo::CacheNode::new(&fnode);
|
||||
let cached_result = cache.eval(&(2, 3));
|
||||
|
||||
println!("{}", cached_result)
|
||||
}
|
||||
Reference in New Issue
Block a user