diff --git a/src/libcrun/handlers/wamr.c b/src/libcrun/handlers/wamr.c index 2e0aa57329..6af5345392 100644 --- a/src/libcrun/handlers/wamr.c +++ b/src/libcrun/handlers/wamr.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -125,7 +124,6 @@ libwamr_exec (void *cookie, __attribute__ ((unused)) libcrun_container_t *contai // load symbols from the shared library libiwasm.so bool (*wasm_runtime_init) (); RuntimeInitArgs init_args; - bool (*wasm_runtime_full_init) (RuntimeInitArgs * init_args); wasm_module_t module; wasm_module_t (*wasm_runtime_load) (uint8_t * buf, uint32_t size, char *error_buf, uint32_t error_buf_size); wasm_module_inst_t module_inst; @@ -135,35 +133,26 @@ libwamr_exec (void *cookie, __attribute__ ((unused)) libcrun_container_t *contai wasm_exec_env_t exec_env; wasm_exec_env_t (*wasm_runtime_create_exec_env) (wasm_module_inst_t module_inst, uint32_t stack_size); bool (*wasm_runtime_call_wasm) (wasm_exec_env_t exec_env, wasm_function_inst_t function, uint32_t argc, uint32_t argv[]); - const char *(*wasm_runtime_get_exception) (wasm_module_inst_t module_inst); void (*wasm_runtime_destroy_exec_env) (wasm_exec_env_t exec_env); void (*wasm_runtime_deinstantiate) (wasm_module_inst_t module_inst); void (*wasm_runtime_unload) (wasm_module_t module); void (*wasm_runtime_destroy) (); - uint32_t (*wasm_runtime_get_wasi_exit_code) (wasm_module_inst_t module_inst); - bool (*wasm_application_execute_main) (wasm_module_inst_t module_inst, int32_t argc, char *argv[]); void (*wasm_runtime_set_wasi_args) (wasm_module_t module, const char *dir_list[], uint32_t dir_count, const char *map_dir_list[], uint32_t map_dir_count, const char *env[], uint32_t env_count, char *argv[], int argc); wasm_runtime_init = dlsym (cookie, "wasm_runtime_init"); - wasm_runtime_full_init = dlsym (cookie, "wasm_runtime_full_init"); wasm_runtime_load = dlsym (cookie, "wasm_runtime_load"); wasm_runtime_instantiate = dlsym (cookie, "wasm_runtime_instantiate"); wasm_runtime_lookup_function = dlsym (cookie, "wasm_runtime_lookup_function"); wasm_runtime_create_exec_env = dlsym (cookie, "wasm_runtime_create_exec_env"); wasm_runtime_call_wasm = dlsym (cookie, "wasm_runtime_call_wasm"); - wasm_runtime_get_exception = dlsym (cookie, "wasm_runtime_get_exception"); wasm_runtime_destroy_exec_env = dlsym (cookie, "wasm_runtime_destroy_exec_env"); wasm_runtime_deinstantiate = dlsym (cookie, "wasm_runtime_deinstantiate"); wasm_runtime_unload = dlsym (cookie, "wasm_runtime_unload"); wasm_runtime_destroy = dlsym (cookie, "wasm_runtime_destroy"); - wasm_runtime_get_wasi_exit_code = dlsym (cookie, "wasm_runtime_get_wasi_exit_code"); - wasm_application_execute_main = dlsym (cookie, "wasm_application_execute_main"); wasm_runtime_set_wasi_args = dlsym (cookie, "wasm_runtime_set_wasi_args"); if (wasm_runtime_init == NULL) error (EXIT_FAILURE, 0, "could not find wasm_runtime_init symbol in `libiwasm.so`"); - if (wasm_runtime_full_init == NULL) - error (EXIT_FAILURE, 0, "could not find wasm_runtime_full_init symbol in `libiwasm.so`"); if (wasm_runtime_load == NULL) error (EXIT_FAILURE, 0, "could not find wasm_runtime_load symbol in `libiwasm.so`"); if (wasm_runtime_instantiate == NULL) @@ -174,8 +163,6 @@ libwamr_exec (void *cookie, __attribute__ ((unused)) libcrun_container_t *contai error (EXIT_FAILURE, 0, "could not find wasm_runtime_create_exec_env symbol in `libiwasm.so`"); if (wasm_runtime_call_wasm == NULL) error (EXIT_FAILURE, 0, "could not find wasm_runtime_call_wasm symbol in `libiwasm.so`"); - if (wasm_runtime_get_exception == NULL) - error (EXIT_FAILURE, 0, "could not find wasm_runtime_get_exception symbol in `libiwasm.so`"); if (wasm_runtime_destroy_exec_env == NULL) error (EXIT_FAILURE, 0, "could not find wasm_runtime_destroy_exec_env symbol in `libiwasm.so`"); if (wasm_runtime_deinstantiate == NULL) @@ -184,10 +171,6 @@ libwamr_exec (void *cookie, __attribute__ ((unused)) libcrun_container_t *contai error (EXIT_FAILURE, 0, "could not find wasm_runtime_unload symbol in `libiwasm.so`"); if (wasm_runtime_destroy == NULL) error (EXIT_FAILURE, 0, "could not find wasm_runtime_destroy symbol in `libiwasm.so`"); - if (wasm_runtime_get_wasi_exit_code == NULL) - error (EXIT_FAILURE, 0, "could not find wasm_runtime_get_wasi_exit_code symbol in `libiwasm.so`"); - if (wasm_application_execute_main == NULL) - error (EXIT_FAILURE, 0, "could not find wasm_application_execute_main symbol in `libiwasm.so`"); if (wasm_runtime_set_wasi_args == NULL) error (EXIT_FAILURE, 0, "could not find wasm_runtime_set_wasi_args symbol in `libiwasm.so`"); @@ -225,7 +208,7 @@ libwamr_exec (void *cookie, __attribute__ ((unused)) libcrun_container_t *contai if (! module_inst) error (EXIT_FAILURE, 0, "Failed to instantiate the WASM module"); - /* lookup a WASM function by its name The function signature can NULL here */ + /* lookup a WASM function by its name; the function signature can be NULL here */ func = wasm_runtime_lookup_function (module_inst, "_start"); if (! func || func == NULL) error (EXIT_FAILURE, 0, "Failed to lookup the WASM function");