This repository has been archived by the owner on Jan 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Mun ABI for modules, fundamental types and methods
- Loading branch information
0 parents
commit 80fee79
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#ifndef MUN_ABI_H_ | ||
#define MUN_ABI_H_ | ||
|
||
#include <stdint.h> | ||
|
||
/** <div rustbindgen derive="PartialEq"> */ | ||
typedef struct | ||
{ | ||
uint8_t b[16]; | ||
} MunGuid; | ||
|
||
typedef struct | ||
{ | ||
MunGuid guid; | ||
const char *name; | ||
} MunTypeInfo; | ||
|
||
typedef enum | ||
{ | ||
MunPrivacyPublic = 0, | ||
MunPrivacyPrivate = 1 | ||
} MunPrivacy; | ||
|
||
typedef uint8_t MunPrivacy_t; | ||
|
||
/** <div rustbindgen derive="Clone"> */ | ||
typedef struct | ||
{ | ||
const char *name; | ||
const MunTypeInfo *arg_types; | ||
const MunTypeInfo *return_type; | ||
const void *fn_ptr; | ||
uint16_t num_arg_types; | ||
MunPrivacy_t privacy; | ||
} MunFunctionInfo; | ||
|
||
typedef struct | ||
{ | ||
const MunFunctionInfo *functions; | ||
uint32_t num_functions; | ||
} MunModuleInfo; | ||
|
||
#endif |