@@ -165,10 +165,17 @@ unsafe extern "C" fn host_callback(
165165 context : * mut sys:: FizzyExecutionContext ,
166166) -> sys:: FizzyExecutionResult {
167167 println ! ( "host fuction called!" ) ;
168- unimplemented ! ( )
168+ //unimplemented!()
169+ sys:: FizzyExecutionResult {
170+ trapped : false ,
171+ has_value : false ,
172+ value : sys:: FizzyValue { i32 : 0 } ,
173+ }
169174}
170175
171- fn create_function_import_list ( host_functions : & [ & HostFunction ] ) -> Vec < sys:: FizzyImportedFunction > {
176+ fn create_function_import_list (
177+ host_functions : & [ & HostFunction ] ,
178+ ) -> Vec < sys:: FizzyImportedFunction > {
172179 assert ! ( host_functions. len( ) == 1 ) ;
173180 let host_function = & host_functions[ 0 ] ;
174181 let fn_type = sys:: FizzyFunctionType {
@@ -181,11 +188,6 @@ fn create_function_import_list(host_functions: &[&HostFunction]) -> Vec<sys::Fiz
181188 function : Some ( host_callback) ,
182189 context : std:: ptr:: null_mut ( ) ,
183190 } ;
184- println ! (
185- "mod:{:?} name:{:?}" ,
186- host_function. module. as_bytes_with_nul( ) ,
187- host_function. name. as_bytes_with_nul( )
188- ) ;
189191 vec ! [ sys:: FizzyImportedFunction {
190192 module: host_function. module. as_ptr( ) ,
191193 name: host_function. name. as_ptr( ) ,
@@ -207,9 +209,6 @@ impl Module {
207209 } ;
208210 let import_list = vec ! [ & host_fn1] ;
209211 let import_list = create_function_import_list ( & import_list) ;
210- println ! ( "importlist: {:?} {}" , import_list. as_ptr( ) , import_list. len( ) ) ;
211- println ! ( "{:?}" , host_fn1. module) ; //unsafe { std::ffi::CStr::from_ptr(import_list[0].module) });
212- println ! ( "{:?}" , unsafe { std:: ffi:: CStr :: from_ptr( import_list[ 0 ] . module) } ) ;
213212 let ptr = unsafe {
214213 sys:: fizzy_resolve_instantiate (
215214 self . 0 . as_ptr ( ) ,
0 commit comments