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/check.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'prototypes/connections/check.py') diff --git a/prototypes/connections/check.py b/prototypes/connections/check.py index 7719537..8a51858 100644 --- a/prototypes/connections/check.py +++ b/prototypes/connections/check.py @@ -500,6 +500,12 @@ def rpc_bytes(path): return json.dumps(json.loads(path.read_text()), ensure_ascii=False, separators=(',', ':')).encode() +def source(name): + """A source file of this document runtime; the core's live in ../../core.""" + here = ROOT / name + return here if here.exists() else ROOT.parent.parent / 'core' / name + + def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('--server', type=Path, default=ROOT / 'build/pure-connections') @@ -532,7 +538,7 @@ def main(): result['environment'] = {'platform': platform.platform(), 'machine': platform.machine(), 'python': platform.python_version(), 'node': subprocess.check_output(['node', '--version'], text=True).strip()} result['source_sha256'] = {str(path.relative_to(ROOT.parent.parent)): hashlib.sha256(path.read_bytes()).hexdigest() - for path in [args.store_source.resolve(), *(ROOT / name for name in ('flow.c', 'flow.h', 'store.h', 'program.c', 'program.h', + for path in [args.store_source.resolve(), *(source(name) for name in ('flow.c', 'flow.h', 'store.h', 'program.c', 'program.h', 'runtime.c', 'runtime.h', 'result.h', 'evaluate.c', 'store-port.c', 'store-port.h', 'test-runtime.c', 'server.c', 'check.py', 'check_edits.py', 'edit.c', 'test-splice.c', 'test-flow.c', 'test-program.c', 'test-fields.c', 'Makefile', -- cgit v1.2.3