@@ -167,10 +167,17 @@ unsafe extern "C" fn host_callback(
167167 context : * mut sys:: FizzyExecutionContext ,
168168) -> sys:: FizzyExecutionResult {
169169 println ! ( "host fuction called!" ) ;
170- unimplemented ! ( )
170+ //unimplemented!()
171+ sys:: FizzyExecutionResult {
172+ trapped : false ,
173+ has_value : false ,
174+ value : sys:: FizzyValue { i32 : 0 } ,
175+ }
171176}
172177
173- fn create_function_import_list ( host_functions : & [ & HostFunction ] ) -> Vec < sys:: FizzyImportedFunction > {
178+ fn create_function_import_list (
179+ host_functions : & [ & HostFunction ] ,
180+ ) -> Vec < sys:: FizzyImportedFunction > {
174181 assert ! ( host_functions. len( ) == 1 ) ;
175182 let host_function = & host_functions[ 0 ] ;
176183 let fn_type = sys:: FizzyFunctionType {
@@ -183,11 +190,6 @@ fn create_function_import_list(host_functions: &[&HostFunction]) -> Vec<sys::Fiz
183190 function : Some ( host_callback) ,
184191 context : std:: ptr:: null_mut ( ) ,
185192 } ;
186- println ! (
187- "mod:{:?} name:{:?}" ,
188- host_function. module. as_bytes_with_nul( ) ,
189- host_function. name. as_bytes_with_nul( )
190- ) ;
191193 vec ! [ sys:: FizzyImportedFunction {
192194 module: host_function. module. as_ptr( ) ,
193195 name: host_function. name. as_ptr( ) ,
@@ -210,9 +212,6 @@ impl Module {
210212 } ;
211213 let import_list = vec ! [ & host_fn1] ;
212214 let import_list = create_function_import_list ( & import_list) ;
213- println ! ( "importlist: {:?} {}" , import_list. as_ptr( ) , import_list. len( ) ) ;
214- println ! ( "{:?}" , host_fn1. module) ; //unsafe { std::ffi::CStr::from_ptr(import_list[0].module) });
215- println ! ( "{:?}" , unsafe { std:: ffi:: CStr :: from_ptr( import_list[ 0 ] . module) } ) ;
216215 let ptr = unsafe {
217216 sys:: fizzy_resolve_instantiate (
218217 self . 0 ,
0 commit comments