c-api: Add a way to get type of wasmtime_module_t (#3959)
My previous PR at #3958 accidentally removed the only way to get type information from a `wasmtime_module_t`, so this commit re-adds methods back in to continue to be able to get import/export information from a compiled module.
This commit is contained in:
@@ -59,6 +59,22 @@ WASM_API_EXTERN void wasmtime_module_delete(wasmtime_module_t *m);
|
||||
*/
|
||||
WASM_API_EXTERN wasmtime_module_t *wasmtime_module_clone(wasmtime_module_t *m);
|
||||
|
||||
/**
|
||||
* \brief Same as #wasm_module_imports, but for #wasmtime_module_t.
|
||||
*/
|
||||
WASM_API_EXTERN void wasmtime_module_imports(
|
||||
const wasmtime_module_t *module,
|
||||
wasm_importtype_vec_t *out
|
||||
);
|
||||
|
||||
/**
|
||||
* \brief Same as #wasm_module_exports, but for #wasmtime_module_t.
|
||||
*/
|
||||
WASM_API_EXTERN void wasmtime_module_exports(
|
||||
const wasmtime_module_t *module,
|
||||
wasm_exporttype_vec_t *out
|
||||
);
|
||||
|
||||
/**
|
||||
* \brief Validate a WebAssembly binary.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user