From 37d3a1e152707d2da587440c4cea8601b9ef0fd2 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sun, 27 Sep 2026 13:14:38 +0100 Subject: Lay Pure out as a core with the parts selected around it The app model, the tree store and the HTTP host lived in prototypes/connections among the earlier document runtime, the store was known only by its format's name, and Vega compiled six Pure sources by path. Now, as the README's principle has it: core/ runtime, flow and the app model (module*.c), with what the core asks of storage (state.h, store.h) store/ the tree store (PURETRE3, PUREREC1) serve/ pure-serve: HTTP host, outbound delivery, JSON in place cli/ pure-run, pure-edit-module A top-level make builds libpure.a (app model and store, for hosts to link) and the hosts; make check runs the store's and the app model's tests. The earlier runtime still builds from prototypes/connections against core/ and store/ (check, check-tree and check-core pass). Design 009 records the rule: parts by role behind libraries; git repositories split by coupling, so the store stays here while its contract moves with the core, and Vega stays apart. --- prototypes/connections/flow.h | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 prototypes/connections/flow.h (limited to 'prototypes/connections/flow.h') diff --git a/prototypes/connections/flow.h b/prototypes/connections/flow.h deleted file mode 100644 index 6e27c58..0000000 --- a/prototypes/connections/flow.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef PURE_FLOW_H -#define PURE_FLOW_H -#include -#include - -typedef struct { const unsigned char *data; size_t size; } PureSpan; -typedef void (*PureRelease)(void *owner); - -/* A borrowed body stays alive until every byte is consumed or the transfer is - * aborted. A successful send() consumes bytes; peer receipt is a separate fact. - * Single owner thread; callbacks must not reenter or reuse this transfer. */ -typedef struct { - PureSpan spans[2]; - size_t part, offset; - void *owner; - PureRelease release; - bool active; -} PureTransfer; - -void pure_transfer_init(PureTransfer *, PureSpan header, PureSpan body, - void *owner, PureRelease); -PureSpan pure_transfer_next(const PureTransfer *, size_t limit); -bool pure_transfer_consume(PureTransfer *, size_t bytes); -void pure_transfer_abort(PureTransfer *); -#endif -- cgit v1.2.3