#ifndef MRT_INTERPRETER_RUNTIME_API_H
#define MRT_INTERPRETER_RUNTIME_API_H
#include "Cangjie.h"
#ifndef INTERPRETER_ENABLED
#if (defined(__linux__) || defined(__IOS__)) && (defined(__x86_64__) || defined(__aarch64__))
#define INTERPRETER_ENABLED
#endif
#endif
#ifdef INTERPRETER_ENABLED
typedef const char* INT_InterpreterArg;
typedef const INT_InterpreterArg* INT_InterpreterArgs;
* @struct InterpreterParam
* @brief Data structure for interpreter configuration parameters.
*/
struct InterpreterParam {
const char* interpreterLibName;
int interpreterArgsCount;
INT_InterpreterArgs interpreterArgs;
void* appLibHandle;
};
CANGJIE_RT_API_DECLS_BEGIN
* @brief Initialize interpreter part of Cangjie runtime environment.
* @attention This API should be invoked after InitCJRuntime succeeds.
* @param param [IN] a structure pointer to interpreter configuration parameters.
* @retval Return 0 if OK. Otherwise, return an error code.
*/
MRT_EXPORT enum RTErrorCode InitCJInterpreter(const struct InterpreterParam* param);
CANGJIE_RT_API_DECLS_END
#endif
#endif