1- #![ cfg_attr( not( feature = "std" ) , no_std) ]
2-
3- #[ cfg( feature = "alloc" ) ]
41extern crate alloc;
5- #[ cfg( feature = "alloc" ) ]
6- use core:: future:: Future ;
72
8- #[ cfg_attr( feature = "log" , macro_use) ]
9- #[ cfg( feature = "log" ) ]
3+ #[ macro_use]
104extern crate log;
115pub use crate as graphene_core;
126pub use num_traits;
137
14- #[ cfg( feature = "reflections" ) ]
158pub use ctor;
169
1710pub mod animation;
@@ -23,37 +16,26 @@ pub mod logic;
2316pub mod misc;
2417pub mod ops;
2518pub mod structural;
26- #[ cfg( feature = "std" ) ]
2719pub mod text;
28- #[ cfg( feature = "std" ) ]
2920pub mod uuid;
3021pub mod value;
3122
32- #[ cfg( feature = "gpu" ) ]
33- pub mod gpu;
34-
35- #[ cfg( feature = "alloc" ) ]
3623pub mod memo;
3724
3825pub mod raster;
39- #[ cfg( feature = "alloc" ) ]
4026pub mod transform;
4127
42- #[ cfg( feature = "alloc" ) ]
4328mod graphic_element;
44- #[ cfg( feature = "alloc" ) ]
4529pub use graphic_element:: * ;
46- #[ cfg( feature = "alloc" ) ]
4730pub mod vector;
4831
49- #[ cfg( feature = "alloc" ) ]
5032pub mod application_io;
5133
52- #[ cfg( feature = "reflections" ) ]
5334pub mod registry;
5435
5536pub use context:: * ;
5637use core:: any:: TypeId ;
38+ use core:: future:: Future ;
5739use core:: pin:: Pin ;
5840pub use dyn_any:: { StaticTypeSized , WasmNotSend , WasmNotSync } ;
5941pub use memo:: MemoHash ;
@@ -74,16 +56,13 @@ pub trait Node<'i, Input> {
7456 core:: any:: type_name :: < Self > ( )
7557 }
7658 /// Serialize the node which is used for the `introspect` function which can retrieve values from monitor nodes.
77- #[ cfg( feature = "std" ) ]
7859 fn serialize ( & self ) -> Option < std:: sync:: Arc < dyn core:: any:: Any + Send + Sync > > {
7960 log:: warn!( "Node::serialize not implemented for {}" , core:: any:: type_name:: <Self >( ) ) ;
8061 None
8162 }
8263}
8364
84- #[ cfg( feature = "alloc" ) ]
8565mod types;
86- #[ cfg( feature = "alloc" ) ]
8766pub use types:: * ;
8867
8968pub trait NodeIO < ' i , Input > : Node < ' i , Input >
@@ -103,15 +82,13 @@ where
10382 fn output_type_name ( & self ) -> & ' static str {
10483 core:: any:: type_name :: < Self :: Output > ( )
10584 }
106- #[ cfg( feature = "alloc" ) ]
10785 fn to_node_io ( & self , inputs : Vec < Type > ) -> NodeIOTypes {
10886 NodeIOTypes {
10987 call_argument : concrete ! ( <Input as StaticTypeSized >:: Static ) ,
11088 return_value : concrete ! ( <Self :: Output as StaticTypeSized >:: Static ) ,
11189 inputs,
11290 }
11391 }
114- #[ cfg( feature = "alloc" ) ]
11592 fn to_async_node_io ( & self , inputs : Vec < Type > ) -> NodeIOTypes
11693 where
11794 <Self :: Output as Future >:: Output : StaticTypeSized ,
@@ -138,22 +115,19 @@ impl<'i, I: 'i, N: Node<'i, I> + ?Sized> Node<'i, I> for &'i N {
138115 ( * self ) . eval ( input)
139116 }
140117}
141- #[ cfg( feature = "alloc" ) ]
142118impl < ' i , I : ' i , O : ' i , N : Node < ' i , I , Output = O > + ?Sized > Node < ' i , I > for Box < N > {
143119 type Output = O ;
144120 fn eval ( & ' i self , input : I ) -> O {
145121 ( * * self ) . eval ( input)
146122 }
147123}
148- #[ cfg( feature = "alloc" ) ]
149124impl < ' i , I : ' i , O : ' i , N : Node < ' i , I , Output = O > + ?Sized > Node < ' i , I > for alloc:: sync:: Arc < N > {
150125 type Output = O ;
151126 fn eval ( & ' i self , input : I ) -> O {
152127 ( * * self ) . eval ( input)
153128 }
154129}
155130
156- #[ cfg( feature = "alloc" ) ]
157131impl < ' i , I , O : ' i > Node < ' i , I > for Pin < Box < dyn Node < ' i , I , Output = O > + ' i > > {
158132 type Output = O ;
159133 fn eval ( & ' i self , input : I ) -> O {
@@ -167,7 +141,6 @@ impl<'i, I, O: 'i> Node<'i, I> for Pin<&'i (dyn NodeIO<'i, I, Output = O> + 'i)>
167141 }
168142}
169143
170- #[ cfg( feature = "alloc" ) ]
171144pub use crate :: application_io:: { SurfaceFrame , SurfaceId } ;
172145#[ cfg( feature = "wasm" ) ]
173146pub type WasmSurfaceHandle = application_io:: SurfaceHandle < web_sys:: HtmlCanvasElement > ;
0 commit comments