@@ -111,10 +111,17 @@ unsafe extern "C" fn host_callback(
111111 context : * mut sys:: FizzyExecutionContext ,
112112) -> sys:: FizzyExecutionResult {
113113 println ! ( "host fuction called!" ) ;
114- unimplemented ! ( )
114+ //unimplemented!()
115+ sys:: FizzyExecutionResult {
116+ trapped : false ,
117+ has_value : false ,
118+ value : sys:: FizzyValue { i32 : 0 } ,
119+ }
115120}
116121
117- fn create_function_import_list ( host_functions : & [ & HostFunction ] ) -> Vec < sys:: FizzyImportedFunction > {
122+ fn create_function_import_list (
123+ host_functions : & [ & HostFunction ] ,
124+ ) -> Vec < sys:: FizzyImportedFunction > {
118125 assert ! ( host_functions. len( ) == 1 ) ;
119126 let host_function = & host_functions[ 0 ] ;
120127 let fn_type = sys:: FizzyFunctionType {
@@ -127,11 +134,6 @@ fn create_function_import_list(host_functions: &[&HostFunction]) -> Vec<sys::Fiz
127134 function : Some ( host_callback) ,
128135 context : std:: ptr:: null_mut ( ) ,
129136 } ;
130- println ! (
131- "mod:{:?} name:{:?}" ,
132- host_function. module. as_bytes_with_nul( ) ,
133- host_function. name. as_bytes_with_nul( )
134- ) ;
135137 vec ! [ sys:: FizzyImportedFunction {
136138 module: host_function. module. as_ptr( ) ,
137139 name: host_function. name. as_ptr( ) ,
@@ -153,9 +155,6 @@ impl Module {
153155 } ;
154156 let import_list = vec ! [ & host_fn1] ;
155157 let import_list = create_function_import_list ( & import_list) ;
156- println ! ( "importlist: {:?} {}" , import_list. as_ptr( ) , import_list. len( ) ) ;
157- println ! ( "{:?}" , host_fn1. module) ; //unsafe { std::ffi::CStr::from_ptr(import_list[0].module) });
158- println ! ( "{:?}" , unsafe { std:: ffi:: CStr :: from_ptr( import_list[ 0 ] . module) } ) ;
159158 let ptr = unsafe {
160159 sys:: fizzy_resolve_instantiate (
161160 self . 0 ,
0 commit comments