From 31ef67850ba20e2f9978a6aa4e30c24eb8432cbe Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Fri, 5 Jun 2026 13:26:13 +0200 Subject: [PATCH] WIP --- crates/README.md | 43 +++++++------------------------------------ 1 file changed, 7 insertions(+), 36 deletions(-) diff --git a/crates/README.md b/crates/README.md index d522393..2a2f8ff 100644 --- a/crates/README.md +++ b/crates/README.md @@ -1,37 +1,8 @@ -## Crates +## Crate Overview -Each subdirectory is a Cargo package with its own `Cargo.toml`. -Layout: - -```text -crates/ - app-name/ - Cargo.toml - src/ - main.rs -``` - -### Responsibilities and Dependencies - -| Crate | Kind | Responsibility | Depends On | -|------------------|-----------------|-------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------| -| `storage` | library | Backend-agnostic `Storage` and `Transaction` traits, plus adapters: `MemoryStorage`, `LmdbStorage`, `RedbStorage`, `FjallStorage`, `SqliteStorage`, `GeomergeStorage` (feature-gated). Owns `Value`, `Table`, `RowId`, `StorageError`, `CodecError`. | external `geomerge` (only with the `geomerge` feature) | -| `query-ops` | library | Snapshot query operators: `scan_atom`, `semijoin`, `natural_join`. Owns `Relation`, `AtomPattern`, `Term`. | `storage` | -| `plan-runner` | library + `plan-run` CLI | Executes JSON plan IR against a chosen `Storage` backend via `--backend {memory \| memory-storage \| lmdb \| redb \| fjall \| sqlite \| geomerge}`. Walks the DAG using `query-ops` operators and verifies against `expected_bindings`. | `query-ops`, `storage` (all adapter features) | -| `geomerge-demo` | binary | End-to-end example exercising `GeomergeStorage`: theory loading, transactional inserts, scan, persistence round trip, law validation. | `storage` (with `geomerge`), external `geomerge` | - -The dependency edges form a strict DAG: - -```text -storage ◄── query-ops ◄── plan-runner - ▲ │ - └── geomerge-demo │ - (also depends on │ - external geomerge) │ - ▼ - (all storage features on) -``` - -No cycles, no upward dependencies. -`query-ops` and `plan-runner` are layered above `storage`; -`geomerge-demo` sits beside them as a runnable example. +| Crate | Kind | Responsibility | +|-----------------|--------------------|-------------------------------------------------------------------------------------------------------------------------------| +| `storage` | library | Defines the interface to use these storage backends. | +| `query-ops` | library | Provides a set of operators to physcially execute a query. | +| `plan-runner` | library and binary | Provides a CLI to run a query plan represnetsion against a given storage backend uisng the operatirs provided by `query-ops`. | +| `geomerge-demo` | binary | An example that shows how to write and read to Geomerge (as a storage). |