Skip to content

Crates ​

Gin is a Cargo workspace. The product crates are listed below, roughly from the core outwards. All are licensed MIT OR Apache-2.0. Workspace lints forbid unsafe code; the SQLite FFI boundary is isolated in gin-sqlite.

Product crates ​

CrateRole
gin-coreThe source-state engine library: typed identities and canonical encodings, trees, checkpoints, change sets, the pack store, evidence envelopes, annotations and retention.
gin-composeDeterministic multi-parent composition: composing effective trees from a DAG of immutable change sets, previews, advance and conflict decisions.
gin-compose-modelA slow, executable reference model of composition. The optimised engine is checked against it with differential tests.
gin-workspaceThe worker side: private journals, savepoints, local checkpoints, publication to the shared plane, lazy parent-update candidates, pinned execution snapshots and the headless source operations. Also the embedded coordinator API (agent::v1).
gin-metaThe control-plane metadata store in embedded SQLite: channels, publications, leases, fencing, the publish transaction, evidence acknowledgements and the event outbox.
gin-casThe packed content-addressed object service of gin serve: verified uploads, batched fetch and staged publication.
gin-apiThe versioned library and protobuf contract (gin.v1). Changes within a major version are additive only.
gin-serverThe one core behind embedded mode and the daemon: tonic gRPC, Unix-socket local IPC with peer credentials, and the embedded entry point.
gin-authMachine-identity tokens, per-operation authorisation, the snapshot-scoped content read API and the scoped workspace inventory.
gin-evidenceEvidence ingestion: idempotent execution receipts, verified CI-run uploads, baseline classification of failing tests, hermetic clearance and strict reuse decisions.
gin-gitThe Git adapter, and the only crate that reads Git: the import endpoint, history on request, SHA mappings, checkpoint export and push blocking.
gin-checkoutStable native source checkouts and content-detected source times. Runs no commands and never removes a caller's build outputs.
gin-viewSource materialisation and the gin.view/1 view lifecycle over public gin.v1 calls, without a build system.
gin-cliThe gin command line over the core API: request builders, the compact JSON renderer and client sessions.
gin-mcpThe compact MCP adapter on stdio, reusing gin-cli's builders, renderer and session.
gin-observabilityOptional OpenTelemetry export. Disabled by default: no collector, threads or network I/O unless the embedding application enables it.
gin-sqliteAn isolated SQLite checksum VFS FFI boundary used by the stores.
ginThe binary: gin serve, gin mcp, gin view, gin ci upload, gin retention, gin verify and the headless commands.

How they fit together ​

LayerCrates
Contractgin-api (depends on no other Gin crate)
Enginegin-core, gin-compose
Stores and servicesgin-meta, gin-cas, gin-server, gin-auth, gin-evidence, gin-git
Workergin-workspace (composition, stores, authorisation and evidence for one worker)
Adaptersgin-cli, gin-mcp (built on gin-cli), gin-view (built on gin-api and gin-checkout)
Binarygin

Every adapter (CLI, MCP, gRPC, local IPC, embedded) ends in the same core call, so validation, envelopes, batch semantics and behaviour are identical however a caller arrives.

Not product code ​

The repository also contains discovery prototypes under proto/ and tools under tools/. They are workspace members so that CI builds and tests them, but they are not product code or production dependencies.

Part of the Tama toolchain.