summaryrefslogtreecommitdiff
path: root/src/core/state.h
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2025-04-10 05:21:21 +0000
committerLinnnus <[email protected]>2025-04-15 00:55:08 +0000
commitbdbb94b63785d03d12b2225222ee34108d896668 (patch)
treef4e7d779db6264ddcc15b9ef9cb0995f15dfadae /src/core/state.h
parent7bd2461c849b4626653a4744427c904b87354bd7 (diff)
feat(cli): More CLI stuff, idk
Diffstat (limited to 'src/core/state.h')
-rw-r--r--src/core/state.h25
1 files changed, 25 insertions, 0 deletions
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 <stddef.h>
+
+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