message: feat(cli) Update the `crate_exe_main.c` file to the latest Wasm C API.
diff: @@ -134,20 +134,22 @@ int main(int argc, char* argv[]) {
  wasm_importtype_vec_t import_types;
  wasm_module_imports(module, &import_types);
  - int num_imports = import_types.size;
  - wasm_extern_t** imports = (wasm_extern_t**) malloc(num_imports * sizeof(wasm_extern_t*));
  +
  + wasm_extern_vec_new_uninitialized(&imports, import_type.size);
  wasm_importtype_vec_delete(&import_types);
  #ifdef WASI
  - bool get_imports_result = wasi_get_imports(store, module, wasi_env, imports);
  + bool get_imports_result = wasi_get_imports(store, module, wasi_env, &imports);
  +
  if (!get_imports_result) {
  fprintf(stderr, "Error getting WASI imports!\n");
  print_wasmer_error();
  +
  return 1;
  }
  #endif
  - wasm_instance_t* instance = wasm_instance_new(store, module, (const wasm_extern_t* const*) imports, NULL);
  + wasm_instance_t* instance = wasm_instance_new(store, module, &imports, NULL);
  if (! instance) {
  fprintf(stderr, "Failed to create instance\n");
  print_wasmer_error();
  