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

Commit

Permalink
Add Mun ABI for modules, fundamental types and methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Wodann committed Sep 22, 2019
0 parents commit 80fee79
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions include/mun_abi.h
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

0 comments on commit 80fee79

Please sign in to comment.