move repos into monorepo
This commit is contained in:
164
WORKSPACE_STRUCTURE.md
Normal file
164
WORKSPACE_STRUCTURE.md
Normal file
@@ -0,0 +1,164 @@
|
||||
# Horus Workspace Structure
|
||||
|
||||
The Horus workspace consolidates all Hero ecosystem components into a single, well-organized monorepo.
|
||||
|
||||
## Workspace Members
|
||||
|
||||
### Binaries (`bin/`)
|
||||
|
||||
#### `bin/supervisor/`
|
||||
- **Package**: `hero-supervisor`
|
||||
- **Description**: Main supervisor for managing actor runners
|
||||
- **Binaries**: `supervisor`
|
||||
- **Library**: `hero_supervisor`
|
||||
|
||||
#### `bin/osiris/`
|
||||
- **Package**: `osiris-server`
|
||||
- **Description**: Osiris HTTP server for object storage
|
||||
- **Binaries**: `osiris`
|
||||
|
||||
#### `bin/runners/sal/`
|
||||
- **Package**: `runner-sal`
|
||||
- **Description**: System Abstraction Layer (SAL) runner
|
||||
- **Binaries**: `runner_sal`
|
||||
|
||||
#### `bin/runners/osiris/`
|
||||
- **Package**: `runner-osiris`
|
||||
- **Description**: Osiris-backed runner with database support
|
||||
- **Binaries**: `runner_osiris`
|
||||
|
||||
### Libraries (`lib/`)
|
||||
|
||||
#### Models (`lib/models/`)
|
||||
|
||||
##### `lib/models/job/`
|
||||
- **Package**: `hero-job`
|
||||
- **Description**: Job model types and builders
|
||||
- **Library**: `hero_job`
|
||||
|
||||
#### Clients (`lib/clients/`)
|
||||
|
||||
##### `lib/clients/job/`
|
||||
- **Package**: `hero-job-client`
|
||||
- **Description**: Redis-based job client
|
||||
- **Library**: `hero_job_client`
|
||||
|
||||
##### `lib/clients/supervisor/`
|
||||
- **Package**: `hero-supervisor-openrpc-client`
|
||||
- **Description**: OpenRPC client for supervisor (native + WASM)
|
||||
- **Library**: `hero_supervisor_openrpc_client`
|
||||
|
||||
##### `lib/clients/osiris/`
|
||||
- **Package**: `osiris-client`
|
||||
- **Description**: Client library for Osiris
|
||||
- **Library**: `osiris_client`
|
||||
|
||||
#### Core Libraries
|
||||
|
||||
##### `lib/runner/`
|
||||
- **Package**: `hero-runner`
|
||||
- **Description**: Core runner library for executing jobs
|
||||
- **Library**: `hero_runner`
|
||||
|
||||
##### `lib/osiris/core/`
|
||||
- **Package**: `osiris-core`
|
||||
- **Description**: Osiris core - object storage and indexing
|
||||
- **Library**: `osiris`
|
||||
|
||||
##### `lib/osiris/derive/`
|
||||
- **Package**: `osiris-derive`
|
||||
- **Description**: Derive macros for Osiris
|
||||
- **Type**: Procedural macro crate
|
||||
|
||||
## Dependency Graph
|
||||
|
||||
```
|
||||
bin/supervisor
|
||||
├── lib/models/job
|
||||
├── lib/clients/job
|
||||
└── (jsonrpsee, redis, tokio, etc.)
|
||||
|
||||
bin/osiris
|
||||
└── lib/osiris/core
|
||||
└── lib/osiris/derive
|
||||
|
||||
bin/runners/sal
|
||||
├── lib/runner
|
||||
│ ├── lib/models/job
|
||||
│ └── lib/clients/job
|
||||
└── (SAL modules from herolib_rust)
|
||||
|
||||
bin/runners/osiris
|
||||
├── lib/runner
|
||||
│ ├── lib/models/job
|
||||
│ └── lib/clients/job
|
||||
└── lib/osiris/core
|
||||
|
||||
lib/clients/supervisor
|
||||
├── lib/models/job
|
||||
└── (jsonrpsee, WASM support)
|
||||
|
||||
lib/clients/osiris
|
||||
├── lib/models/job
|
||||
└── lib/clients/supervisor
|
||||
|
||||
lib/clients/job
|
||||
└── lib/models/job
|
||||
```
|
||||
|
||||
## Build Commands
|
||||
|
||||
```bash
|
||||
# Check entire workspace
|
||||
cargo check --workspace
|
||||
|
||||
# Build entire workspace
|
||||
cargo build --workspace
|
||||
|
||||
# Build specific package
|
||||
cargo build -p hero-supervisor
|
||||
cargo build -p osiris-core
|
||||
cargo build -p runner-sal
|
||||
|
||||
# Run binaries
|
||||
cargo run -p hero-supervisor --bin supervisor
|
||||
cargo run -p osiris-server --bin osiris
|
||||
cargo run -p runner-sal --bin runner_sal
|
||||
cargo run -p runner-osiris --bin runner_osiris
|
||||
```
|
||||
|
||||
## Migration Notes
|
||||
|
||||
### From External Repos
|
||||
|
||||
The following components were migrated into this workspace:
|
||||
|
||||
1. **Job** (`/herocode/job/rust`) → `lib/models/job` + `lib/clients/job`
|
||||
2. **Runner** (`/herocode/runner/rust`) → `lib/runner` + `bin/runners/*`
|
||||
3. **Osiris** (`/herocode/osiris`) → `lib/osiris/*` + `bin/osiris` + `lib/clients/osiris`
|
||||
4. **Supervisor** (already in workspace) → `bin/supervisor` + `lib/clients/supervisor`
|
||||
|
||||
### Path Dependencies
|
||||
|
||||
All internal dependencies now use path-based references:
|
||||
- `hero-job = { path = "../../lib/models/job" }`
|
||||
- `osiris-core = { path = "../../lib/osiris/core" }`
|
||||
- etc.
|
||||
|
||||
External dependencies (SAL modules, heromodels, etc.) remain as git dependencies.
|
||||
|
||||
## Workspace Configuration
|
||||
|
||||
Shared dependencies are defined in the root `Cargo.toml` under `[workspace.dependencies]`:
|
||||
- tokio, async-trait
|
||||
- serde, serde_json
|
||||
- redis, uuid, chrono
|
||||
- jsonrpsee, axum, tower
|
||||
- And more...
|
||||
|
||||
Individual crates reference these with `.workspace = true`:
|
||||
```toml
|
||||
[dependencies]
|
||||
tokio.workspace = true
|
||||
serde.workspace = true
|
||||
```
|
||||
Reference in New Issue
Block a user