Skip to content
This repository was archived by the owner on Jan 2, 2023. It is now read-only.

Commit eced94f

Browse files
authored
Merge pull request #1 from Wodann/feature/dispatch-table
Add dispatch table and dependencies
2 parents 97e94fb + 39f28db commit eced94f

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

include/mun_abi.h

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
/** <div rustbindgen derive="PartialEq"> */
77
typedef struct
88
{
9-
uint8_t b[16];
9+
const uint8_t b[16];
1010
} MunGuid;
1111

1212
typedef struct
1313
{
14-
MunGuid guid;
14+
const MunGuid guid;
1515
const char *name;
1616
} MunTypeInfo;
1717

@@ -29,15 +29,37 @@ typedef struct
2929
const char *name;
3030
const MunTypeInfo *arg_types;
3131
const MunTypeInfo *return_type;
32+
const uint16_t num_arg_types;
33+
const MunPrivacy_t privacy;
34+
} MunFunctionSignature;
35+
36+
/** <div rustbindgen derive="Clone"> */
37+
typedef struct
38+
{
39+
const MunFunctionSignature signature;
3240
const void *fn_ptr;
33-
uint16_t num_arg_types;
34-
MunPrivacy_t privacy;
3541
} MunFunctionInfo;
3642

3743
typedef struct
3844
{
45+
const char *path;
3946
const MunFunctionInfo *functions;
40-
uint32_t num_functions;
47+
const uint32_t num_functions;
4148
} MunModuleInfo;
4249

50+
typedef struct
51+
{
52+
const MunFunctionSignature *signatures;
53+
const void **fn_ptrs;
54+
const uint32_t num_entries;
55+
} MunDispatchTable;
56+
57+
typedef struct
58+
{
59+
const MunModuleInfo symbols;
60+
MunDispatchTable dispatch_table;
61+
const char *const *dependencies;
62+
const uint32_t num_dependencies;
63+
} MunAssemblyInfo;
64+
4365
#endif

0 commit comments

Comments
 (0)