@@ -206,10 +206,17 @@ unsafe extern "C" fn host_callback(
206206 context : * mut sys:: FizzyExecutionContext ,
207207) -> sys:: FizzyExecutionResult {
208208 println ! ( "host fuction called!" ) ;
209- unimplemented ! ( )
209+ //unimplemented!()
210+ sys:: FizzyExecutionResult {
211+ trapped : false ,
212+ has_value : false ,
213+ value : sys:: FizzyValue { i32 : 0 } ,
214+ }
210215}
211216
212- fn create_function_import_list ( host_functions : & [ & HostFunction ] ) -> Vec < sys:: FizzyImportedFunction > {
217+ fn create_function_import_list (
218+ host_functions : & [ & HostFunction ] ,
219+ ) -> Vec < sys:: FizzyImportedFunction > {
213220 assert ! ( host_functions. len( ) == 1 ) ;
214221 let host_function = & host_functions[ 0 ] ;
215222 let fn_type = sys:: FizzyFunctionType {
@@ -222,11 +229,6 @@ fn create_function_import_list(host_functions: &[&HostFunction]) -> Vec<sys::Fiz
222229 function : Some ( host_callback) ,
223230 context : std:: ptr:: null_mut ( ) ,
224231 } ;
225- println ! (
226- "mod:{:?} name:{:?}" ,
227- host_function. module. as_bytes_with_nul( ) ,
228- host_function. name. as_bytes_with_nul( )
229- ) ;
230232 vec ! [ sys:: FizzyImportedFunction {
231233 module: host_function. module. as_ptr( ) ,
232234 name: host_function. name. as_ptr( ) ,
@@ -248,9 +250,6 @@ impl Module {
248250 } ;
249251 let import_list = vec ! [ & host_fn1] ;
250252 let import_list = create_function_import_list ( & import_list) ;
251- println ! ( "importlist: {:?} {}" , import_list. as_ptr( ) , import_list. len( ) ) ;
252- println ! ( "{:?}" , host_fn1. module) ; //unsafe { std::ffi::CStr::from_ptr(import_list[0].module) });
253- println ! ( "{:?}" , unsafe { std:: ffi:: CStr :: from_ptr( import_list[ 0 ] . module) } ) ;
254253 let ptr = unsafe {
255254 sys:: fizzy_resolve_instantiate (
256255 self . 0 . as_ptr ( ) ,
0 commit comments