From 80fee79c8198013a35d5189825fd32200d5bbb34 Mon Sep 17 00:00:00 2001 From: Wodann Date: Sat, 21 Sep 2019 12:17:28 +0200 Subject: [PATCH] Add Mun ABI for modules, fundamental types and methods --- include/mun_abi.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 include/mun_abi.h diff --git a/include/mun_abi.h b/include/mun_abi.h new file mode 100644 index 0000000..c7d9116 --- /dev/null +++ b/include/mun_abi.h @@ -0,0 +1,43 @@ +#ifndef MUN_ABI_H_ +#define MUN_ABI_H_ + +#include + +/**
*/ +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; + +/**
*/ +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