#ifndef AETHER_H
#define AETHER_H
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
typedef struct AetherHandle {
uint8_t _opaque[0];
} AetherHandle;
typedef struct AetherLimits {
int max_steps;
int max_recursion_depth;
int max_duration_ms;
} AetherLimits;
typedef struct AetherCacheStats {
int hits;
int misses;
int size;
} AetherCacheStats;
#ifdef __cplusplus
extern "C" {
#endif
struct AetherHandle *aether_new(void);
struct AetherHandle *aether_new_with_permissions(void);
int aether_eval(struct AetherHandle *handle, const char *code, char **result, char **error);
const char *aether_version(void);
void aether_free(struct AetherHandle *handle);
void aether_free_string(char *s);
int aether_set_global(struct AetherHandle *handle,
const char *name,
const char *value_json);
int aether_get_global(struct AetherHandle *handle,
const char *name,
char **value_json);
void aether_reset_env(struct AetherHandle *handle);
int aether_take_trace(struct AetherHandle *handle,
char **trace_json);
void aether_clear_trace(struct AetherHandle *handle);
int aether_trace_records(struct AetherHandle *handle,
char **trace_json);
int aether_trace_stats(struct AetherHandle *handle,
char **stats_json);
void aether_set_limits(struct AetherHandle *handle,
const struct AetherLimits *limits);
void aether_get_limits(struct AetherHandle *handle,
struct AetherLimits *limits);
void aether_clear_cache(struct AetherHandle *handle);
void aether_cache_stats(struct AetherHandle *handle,
struct AetherCacheStats *stats);
void aether_set_optimization(struct AetherHandle *handle,
int constant_folding,
int dead_code_elimination,
int tail_recursion);
extern void log(const str *s);
#ifdef __cplusplus
} #endif
#endif