Crate Dependency Graph

TALA is structured as a Cargo workspace of 12 crates. The dependency graph is a strict DAG: dependencies flow downward from foundation types to application binaries. No cycles exist. cargo-deny enforces this invariant via [bans] configuration.

Dependency Hierarchy

                        tala-core
                       /    |    \
                      /     |     \
               tala-wire  tala-embed  (no inter-dependency)
                  |    \    /   |
                  |  tala-store |
                  |      |      |
             tala-graph  |  tala-intent
               /    \    |    /
        tala-weave  tala-kai
                  \   |   /
                tala-net
                    |
              tala-daemon
                    |
               tala-cli

Governing Invariants

No dependency cycles. The workspace resolver enforces this structurally. A crate may only depend on crates above it in the hierarchy.

Traits define boundaries. Inter-crate communication happens through trait objects and generic bounds defined exclusively in tala-core. No concrete types from sibling crates appear in public APIs. tala-store implements IntentStore; tala-embed provides the similarity functions consumed through the Embedder trait; tala-graph implements GraphEngine. Each crate can be compiled, tested, and benchmarked in isolation.

tala-core defines, others implement. All shared vocabulary types (Intent, Edge, IntentId, RelationType, TalaError) and all trait definitions (IntentStore, Embedder, GraphEngine, IntentExtractor, Transport) live in tala-core. Implementation code lives in the crate that owns the concern.

Crate Reference

CrateLayerDescription
tala-coreFoundationTypes, traits, error taxonomy. Zero dependencies beyond std. Every other crate imports this.
tala-wireStorageTBF binary format reader/writer: columnar serialization, CSR edges, bloom filters, B+ tree index.
tala-embedComputeSIMD-accelerated vector operations (AVX2, NEON), HNSW approximate nearest-neighbor index, quantization (f32/f16/int8).
tala-storeStorageStorage engine: WAL, hot buffer, segment lifecycle, HNSW-backed semantic query. Implements IntentStore.
tala-graphComputeNarrative graph: adjacency-list DAG, BFS/DFS traversal, edge formation, narrative extraction and diffing.
tala-intentPipelineIntent extraction: command tokenization, classification, context assembly, embedding generation. Implements IntentExtractor.
tala-weaveExecutionReplay engine: DAG-ordered scheduling, environment adaptation, idempotency detection, failure recovery.
tala-kaiAnalysisInsight engine: failure clustering, pattern detection, predictive suggestions, narrative summarization.
tala-netNetworkDistributed mode: QUIC transport, SWIM membership, Raft consensus, partition-aware replication.
tala-daemonApplicationtalad binary: Unix socket server, ingest pipeline orchestration, event hooks, metrics, health checks.
tala-cliApplicationtala binary: user-facing CLI (find, replay, diff, why, stitch, status), output formatting.
xtaskToolingCustom build tasks: formatting, linting, benchmarking, coverage, release packaging.

Async Runtime Boundaries

Not every crate uses async. The workspace draws a clear line:

  • Sync crates: tala-core, tala-wire, tala-embed, tala-graph. These are pure computation or I/O-free. They use rayon for parallelism where applicable, but no Tokio dependency.
  • Async crates: tala-daemon, tala-cli, tala-net, tala-weave. These depend on Tokio for I/O multiplexing, network transport, and concurrent task management.
  • Bridging: tala-store is structurally sync but used within talad's async context. ONNX Runtime and CUDA calls in tala-embed are blocking and dispatched via spawn_blocking.

tala-core remains runtime-agnostic. Its trait definitions use async fn via async-trait where necessary, but the crate itself has no runtime dependency.

Feature Flags

Feature flags control optional capabilities. Default features cover the common single-node case.

CrateFeatureDefaultControls
tala-wiremmapyesMemory-mapped segment access
tala-wirecompressionyeslz4 and zstd segment compression
tala-wireencryptionnoAES-256-GCM encrypted segments
tala-embedsimdyesSIMD vector operations
tala-embedcudanoNVIDIA GPU acceleration
tala-embedvulkannoVulkan compute acceleration
tala-embedonnxyesLocal ONNX model inference
tala-embedremote-embednoRemote embedding API
tala-netclusternoDistributed mode

Dependency Versions

All shared dependency versions are declared in the workspace [workspace.dependencies] table. Individual crates reference them with { workspace = true }. This prevents version skew across the workspace and centralizes upgrade decisions.

Key external dependencies:

DependencyVersionUsed By
tokio1.xtala-daemon, tala-cli, tala-net, tala-weave
uuid1.x (v7, serde)tala-core
thiserror2.xtala-core
memmap20.9.xtala-wire
rayon1.xtala-embed
quinn0.11.xtala-net
criterion0.5.xBenchmarks across all crates
proptest1.xProperty tests