#ifndef _Included_rustlang_worker
#define _Included_rustlang_worker
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef RAY_NATIVE_PROLOGUE_H
#define RAY_NATIVE_PROLOGUE_H
typedef unsigned long long RayInt64;
typedef RayInt64 RayInt;
typedef struct RaySlice {
void *data;
RayInt64 len;
RayInt64 cap;
} RaySlice;
#endif
typedef struct DataBuffer {
size_t size;
uint8_t *p;
} DataBuffer;
typedef struct DataValue {
struct DataBuffer *data;
struct DataBuffer *meta;
} DataValue;
typedef void (*c_worker_ExecuteCallback)(RayInt task_type, RaySlice ray_function_info,
RaySlice args, RaySlice return_values);
int c_worker_RegisterExecutionCallback(c_worker_ExecuteCallback callback);
DataValue *c_worker_AllocateDataValue(uint8_t *data_ptr, size_t data_size, uint8_t *meta_ptr, size_t meta_size);
void c_worker_InitConfig(int workerMode, int language, int num_workers,
char *code_search_path, char *head_args,
int argc, char** argv);
void c_worker_Initialize();
void c_worker_Run();
void c_worker_Log(char* msg);
void c_worker_AddLocalRef(char* id);
void c_worker_RemoveLocalRef(char* id);
int c_worker_SubmitTask(char *method_name, bool *input_is_ref,
DataValue **input_values, char **input_refs,
int num_input_value,
int num_returns, char **object_ids);
int c_worker_Get(char **object_ids, int object_ids_size, int timeout, DataValue **objects);
int c_worker_Put(char **object_ids, int timeout, DataValue **objects, int objects_size);
void c_worker_Shutdown();
#ifdef __cplusplus
}
#endif
#endif