@@ -7,8 +7,10 @@ use datafusion_common::Result as DataFusionResult;
77use datafusion_expr:: ScalarUDFImpl ;
88use datafusion_udf_wasm_guest:: export;
99
10+ mod common;
1011mod root;
1112mod runtime;
13+ mod spin;
1214
1315/// Method that returns the root filesystem.
1416type RootFn = Box < dyn Fn ( ) -> Option < Vec < u8 > > > ;
@@ -37,6 +39,34 @@ impl Evil {
3739 root : Box :: new ( runtime:: root) ,
3840 udfs : Box :: new ( runtime:: udfs) ,
3941 } ,
42+ "spin::root" => Self {
43+ root : Box :: new ( spin:: root:: root) ,
44+ udfs : Box :: new ( common:: udfs_empty) ,
45+ } ,
46+ "spin::udf_invoke" => Self {
47+ root : Box :: new ( common:: root_empty) ,
48+ udfs : Box :: new ( spin:: udf_invoke:: udfs) ,
49+ } ,
50+ "spin::udf_name" => Self {
51+ root : Box :: new ( common:: root_empty) ,
52+ udfs : Box :: new ( spin:: udf_name:: udfs) ,
53+ } ,
54+ "spin::udf_return_type_exact" => Self {
55+ root : Box :: new ( common:: root_empty) ,
56+ udfs : Box :: new ( spin:: udf_return_type_exact:: udfs) ,
57+ } ,
58+ "spin::udf_return_type_other" => Self {
59+ root : Box :: new ( common:: root_empty) ,
60+ udfs : Box :: new ( spin:: udf_return_type_other:: udfs) ,
61+ } ,
62+ "spin::udf_signature" => Self {
63+ root : Box :: new ( common:: root_empty) ,
64+ udfs : Box :: new ( spin:: udf_signature:: udfs) ,
65+ } ,
66+ "spin::udfs" => Self {
67+ root : Box :: new ( common:: root_empty) ,
68+ udfs : Box :: new ( spin:: udfs:: udfs) ,
69+ } ,
4070 other => panic ! ( "unknown evil: {other}" ) ,
4171 }
4272 }
0 commit comments