Updated Runtime C API comments

This commit is contained in:
Syrus
2019-09-01 08:52:19 -07:00
parent dc02d0e401
commit bc990cc18a
2 changed files with 28 additions and 0 deletions

View File

@ -6,6 +6,9 @@
#include <stdint.h>
#include <stdlib.h>
/**
* List of export/import kinds.
*/
enum wasmer_import_export_kind {
WASM_FUNCTION,
WASM_GLOBAL,
@ -31,6 +34,9 @@ typedef struct {
} wasmer_module_t;
/**
* Opaque pointer to `NamedExportDescriptor`.
*/
typedef struct {
} wasmer_export_descriptor_t;
@ -40,10 +46,16 @@ typedef struct {
uint32_t bytes_len;
} wasmer_byte_array;
/**
* Opaque pointer to `NamedExportDescriptors`.
*/
typedef struct {
} wasmer_export_descriptors_t;
/**
* Opaque pointer to `wasmer_export_t`.
*/
typedef struct {
} wasmer_export_func_t;
@ -60,6 +72,9 @@ typedef struct {
wasmer_value value;
} wasmer_value_t;
/**
* Opaque pointer to `NamedExport`.
*/
typedef struct {
} wasmer_export_t;
@ -68,6 +83,9 @@ typedef struct {
} wasmer_memory_t;
/**
* Opaque pointer to `NamedExports`.
*/
typedef struct {
} wasmer_exports_t;
@ -101,6 +119,9 @@ typedef struct {
} wasmer_table_t;
/**
* Union of import/export value.
*/
typedef union {
const wasmer_import_func_t *func;
const wasmer_table_t *table;

View File

@ -6,6 +6,7 @@
#include <cstdlib>
#include <new>
/// List of export/import kinds.
enum class wasmer_import_export_kind : uint32_t {
WASM_FUNCTION,
WASM_GLOBAL,
@ -29,6 +30,7 @@ struct wasmer_module_t {
};
/// Opaque pointer to `NamedExportDescriptor`.
struct wasmer_export_descriptor_t {
};
@ -38,10 +40,12 @@ struct wasmer_byte_array {
uint32_t bytes_len;
};
/// Opaque pointer to `NamedExportDescriptors`.
struct wasmer_export_descriptors_t {
};
/// Opaque pointer to `wasmer_export_t`.
struct wasmer_export_func_t {
};
@ -58,6 +62,7 @@ struct wasmer_value_t {
wasmer_value value;
};
/// Opaque pointer to `NamedExport`.
struct wasmer_export_t {
};
@ -66,6 +71,7 @@ struct wasmer_memory_t {
};
/// Opaque pointer to `NamedExports`.
struct wasmer_exports_t {
};
@ -99,6 +105,7 @@ struct wasmer_table_t {
};
/// Union of import/export value.
union wasmer_import_export_value {
const wasmer_import_func_t *func;
const wasmer_table_t *table;