mirror of
https://github.com/fluencelabs/wasmer
synced 2025-07-31 07:12:10 +00:00
Add C API module import descriptors
This commit is contained in:
@@ -68,6 +68,14 @@ struct wasmer_global_descriptor_t {
|
||||
wasmer_value_tag kind;
|
||||
};
|
||||
|
||||
struct wasmer_import_descriptor_t {
|
||||
|
||||
};
|
||||
|
||||
struct wasmer_import_descriptors_t {
|
||||
|
||||
};
|
||||
|
||||
struct wasmer_memory_t {
|
||||
|
||||
};
|
||||
@@ -192,6 +200,30 @@ wasmer_global_t *wasmer_global_new(wasmer_value_t value, bool mutable_);
|
||||
/// Sets the value stored by the given Global
|
||||
void wasmer_global_set(wasmer_global_t *global, wasmer_value_t value);
|
||||
|
||||
/// Gets export descriptor kind
|
||||
wasmer_import_export_kind wasmer_import_descriptor_kind(wasmer_import_descriptor_t *export_);
|
||||
|
||||
/// Gets module name for the import descriptor
|
||||
wasmer_byte_array wasmer_import_descriptor_module_name(wasmer_import_descriptor_t *import_descriptor);
|
||||
|
||||
/// Gets name for the import descriptor
|
||||
wasmer_byte_array wasmer_import_descriptor_name(wasmer_import_descriptor_t *import_descriptor);
|
||||
|
||||
/// Gets import descriptors for the given module
|
||||
/// The caller owns the object and should call `wasmer_import_descriptors_destroy` to free it.
|
||||
void wasmer_import_descriptors(wasmer_module_t *module,
|
||||
wasmer_import_descriptors_t **import_descriptors);
|
||||
|
||||
/// Frees the memory for the given import descriptors
|
||||
void wasmer_import_descriptors_destroy(wasmer_import_descriptors_t *import_descriptors);
|
||||
|
||||
/// Gets import descriptor by index
|
||||
wasmer_import_descriptor_t *wasmer_import_descriptors_get(wasmer_import_descriptors_t *import_descriptors,
|
||||
int idx);
|
||||
|
||||
/// Gets the length of the import descriptors
|
||||
int wasmer_import_descriptors_len(wasmer_import_descriptors_t *exports);
|
||||
|
||||
/// Calls an instances exported function by `name` with the provided parameters.
|
||||
/// Results are set using the provided `results` pointer.
|
||||
/// Returns `wasmer_result_t::WASMER_OK` upon success.
|
||||
|
Reference in New Issue
Block a user