From efba82d75e4357c7e82b027b04a5ec9937f8443b Mon Sep 17 00:00:00 2001 From: eunhhu Date: Fri, 25 Sep 2026 11:48:51 +0100 Subject: Add typed messages and keyed documents to Pure modules Module format v2 adds byte values, message inputs with u32 and bytes-tail fields, one keyed byte collection, replies and require. The verifier checks every operand's type and the context each operation may run in, and allows branches and joins only at an empty stack, so typed values never merge. A message event opens its key's working version through a PureData host, conflicts early on a stale base revision, runs its handlers, and commits only if they succeed; a failed event leaves documents and states unchanged. Replies lend payload or document extents, and a document reply is copied before commit. pure_tree_data implements the host on tree store drafts, and pure-edit-module offers the document CLI contract of pure-edit from a module. test-module adds document semantics on an in-memory host (not found, create, conflict before bounds, limits, short payloads, busy commits, stable replies, require, state rollback), typed verifier rules, and 20,000 damaged message modules run safely under ASan/UBSan. --- prototypes/connections/pure-run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prototypes/connections/pure-run.c') diff --git a/prototypes/connections/pure-run.c b/prototypes/connections/pure-run.c index 9059a1e..71b7d0a 100644 --- a/prototypes/connections/pure-run.c +++ b/prototypes/connections/pure-run.c @@ -48,7 +48,7 @@ int main(int argc, char **argv) { } unsigned active = 0; PureApp app; - pure_app_start(&app, &modules[active]); + pure_app_start(&app, &modules[active], (PureData){0}); char line[4096]; int status = 0; while (fgets(line, sizeof(line), stdin)) { -- cgit v1.2.3