Interaction Trees in Zig and simple benchmarks
This commit is contained in:
@@ -40,6 +40,25 @@ int arb_to_bool(arb_ctx_t* ctx, uint32_t root, int* out);
|
||||
int arb_unwrap_result(arb_ctx_t* ctx, uint32_t root, int* out_ok, uint32_t* out_value, uint32_t* out_rest);
|
||||
int arb_unwrap_host_value(arb_ctx_t* ctx, uint32_t root, uint64_t* out_tag, uint32_t* out_payload);
|
||||
|
||||
/* Tree inspection (Layer 1 — for custom IO drivers and non-POSIX hosts) */
|
||||
int arb_is_leaf(arb_ctx_t* ctx, uint32_t root);
|
||||
int arb_is_stem(arb_ctx_t* ctx, uint32_t root);
|
||||
int arb_is_fork(arb_ctx_t* ctx, uint32_t root);
|
||||
int arb_is_app(arb_ctx_t* ctx, uint32_t root);
|
||||
int arb_get_stem_child(arb_ctx_t* ctx, uint32_t root, uint32_t* out);
|
||||
int arb_get_fork_children(arb_ctx_t* ctx, uint32_t root,
|
||||
uint32_t* out_left, uint32_t* out_right);
|
||||
int arb_get_app_func_arg(arb_ctx_t* ctx, uint32_t root,
|
||||
uint32_t* out_func, uint32_t* out_arg);
|
||||
|
||||
/* IO driver (Layer 2 — POSIX interaction-tree runtime) */
|
||||
typedef struct {
|
||||
int allow_read_all;
|
||||
int allow_write_all;
|
||||
} arb_io_perms_t;
|
||||
|
||||
uint32_t arb_run_io(arb_ctx_t* ctx, uint32_t program, const arb_io_perms_t* perms);
|
||||
|
||||
/* Kernel entrypoints */
|
||||
uint32_t arb_kernel_root(arb_ctx_t* ctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user