Common shared Types
Find a file
2026-07-13 22:36:18 +02:00
.cargo MTP tools & Centralizing 2026-06-30 22:52:08 +02:00
src Connectivity, Tools, Flows & Prompts 2026-07-13 22:36:18 +02:00
.gitignore structure 2026-04-30 17:10:40 +02:00
Cargo.lock API 2026-07-11 17:06:21 +02:00
Cargo.toml clean & tools 2026-07-09 00:13:22 +02:00
README.md Connector 2026-05-04 22:16:42 +02:00
type-maps.yaml MTP tools & Centralizing 2026-07-03 06:14:01 +02:00

Commons

Commons is the shared type library for Shoal - common types used across all components.

What it Does

Commons provides consistent, reusable types throughout the Shoal system:

  • Shared data structures - Types used by Pod, Reef, Reservoir, Dock, Lookout
  • Optional TTP serialization - Types can be serialized using TTP (Transport Type Protocol)
  • Cross-crate consistency - Ensures all components use the same type definitions

How to Use

Dependencies

Add to your Cargo.toml:

shoal-types = { git = "https://git.methanium.net/shoal/commons.git" }

Usage

Import common types:

use common::{Task, KrillConfig, ProjectMetadata, ...};

Purpose

Instead of each component defining its own types, Commons centralizes:

  • Communication message types (including training progress, control signals)
  • Task definitions (JobType::Task, JobType::Training, JobType::DataPreparation)
  • Training job payloads (TrainingJob, InferenceJob, TrainingMetrics, TrainingControl)
  • Configuration structures
  • Storage schemas

This ensures type safety and consistency across the entire Shoal ecosystem.