From bdbb94b63785d03d12b2225222ee34108d896668 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Thu, 10 Apr 2025 05:21:21 +0000 Subject: feat(cli): More CLI stuff, idk --- src/core/state.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/core/state.h (limited to 'src/core/state.h') diff --git a/src/core/state.h b/src/core/state.h new file mode 100644 index 0000000..406a79c --- /dev/null +++ b/src/core/state.h @@ -0,0 +1,25 @@ +#ifndef SAND_STATE_H +#define SAND_STATE_H + +// This module defines the evaluator state. This is the "world" in Sand. +// Multiple evaluator states can coexist as they are totally separate. + +#include + +typedef void (* SandPrintHandler)(const char *message, size_t length); + +typedef struct { + SandPrintHandler print_handler; +} SandConfig; + +// This data structure should be treated as entirely opaque by consuming code. +typedef struct { + SandConfig config; +} SandState; + + +SandState sand_create_state(SandConfig config); + +void sand_destroy_state(SandState *); + +#endif -- cgit v1.2.3