@@ -167,10 +167,17 @@ unsafe extern "C" fn host_callback(
167
167
context : * mut sys:: FizzyExecutionContext ,
168
168
) -> sys:: FizzyExecutionResult {
169
169
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
+ }
171
176
}
172
177
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 > {
174
181
assert ! ( host_functions. len( ) == 1 ) ;
175
182
let host_function = & host_functions[ 0 ] ;
176
183
let fn_type = sys:: FizzyFunctionType {
@@ -183,11 +190,6 @@ fn create_function_import_list(host_functions: &[&HostFunction]) -> Vec<sys::Fiz
183
190
function : Some ( host_callback) ,
184
191
context : std:: ptr:: null_mut ( ) ,
185
192
} ;
186
- println ! (
187
- "mod:{:?} name:{:?}" ,
188
- host_function. module. as_bytes_with_nul( ) ,
189
- host_function. name. as_bytes_with_nul( )
190
- ) ;
191
193
vec ! [ sys:: FizzyImportedFunction {
192
194
module: host_function. module. as_ptr( ) ,
193
195
name: host_function. name. as_ptr( ) ,
@@ -210,9 +212,6 @@ impl Module {
210
212
} ;
211
213
let import_list = vec ! [ & host_fn1] ;
212
214
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) } ) ;
216
215
let ptr = unsafe {
217
216
sys:: fizzy_resolve_instantiate (
218
217
self . 0 ,
0 commit comments