mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-13 00:51:20 +00:00
Add C API module export descriptors
This commit is contained in:
@ -35,7 +35,7 @@ typedef struct wasmer_module_t wasmer_module_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
} wasmer_export_t;
|
||||
} wasmer_export_descriptor_t;
|
||||
|
||||
typedef struct {
|
||||
const uint8_t *bytes;
|
||||
@ -44,6 +44,14 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
} wasmer_export_descriptors_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
} wasmer_export_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
} wasmer_func_t;
|
||||
|
||||
typedef struct {
|
||||
@ -113,6 +121,39 @@ wasmer_result_t wasmer_compile(wasmer_module_t **module,
|
||||
uint8_t *wasm_bytes,
|
||||
uint32_t wasm_bytes_len);
|
||||
|
||||
/**
|
||||
* Gets export descriptor kind
|
||||
*/
|
||||
wasmer_import_export_kind wasmer_export_descriptor_kind(wasmer_export_descriptor_t *export_);
|
||||
|
||||
/**
|
||||
* Gets name for the export descriptor
|
||||
*/
|
||||
wasmer_byte_array wasmer_export_descriptor_name(wasmer_export_descriptor_t *export_descriptor);
|
||||
|
||||
/**
|
||||
* Gets export descriptors for the given module
|
||||
* The caller owns the object and should call `wasmer_export_descriptors_destroy` to free it.
|
||||
*/
|
||||
void wasmer_export_descriptors(wasmer_module_t *module,
|
||||
wasmer_export_descriptors_t **export_descriptors);
|
||||
|
||||
/**
|
||||
* Frees the memory for the given export descriptors
|
||||
*/
|
||||
void wasmer_export_descriptors_destroy(wasmer_export_descriptors_t *export_descriptors);
|
||||
|
||||
/**
|
||||
* Gets export descriptor by index
|
||||
*/
|
||||
wasmer_export_descriptor_t *wasmer_export_descriptors_get(wasmer_export_descriptors_t *export_descriptors,
|
||||
int idx);
|
||||
|
||||
/**
|
||||
* Gets the length of the export descriptors
|
||||
*/
|
||||
int wasmer_export_descriptors_len(wasmer_export_descriptors_t *exports);
|
||||
|
||||
/**
|
||||
* Gets wasmer_export kind
|
||||
*/
|
||||
|
Reference in New Issue
Block a user