# arcellateam/arcella architecture

> Architecture diagram of the GitHub repository arcellateam/arcella, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arcellateam/arcella
- Repository: https://github.com/arcellateam/arcella

## Overview

Arcella is a modular WebAssembly application runtime, with an ALME Unix-socket daemon and a CLI for administration. The documented workflow is: an administrator issues lifecycle requests; ALME routes them to runtime operations, which install components and process deployment specifications to manage replicas. Configuration and manifest handling support that lifecycle, while the engine layer provides Wasmtime integration. The README describes hybrid isolation, scaling, and Component Model support, but the supplied excerpts do not show their runtime call paths, so those relationships are not asserted here.

Main entry points: [`arcella-core/src/runtime/mod.rs`](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/runtime/mod.rs) (Runtime API), [`arcella/src/alme/server.rs`](https://github.com/arcellateam/arcella/blob/dev/arcella/src/alme/server.rs) (ALME socket server), [`arcella-core/src/runtime/deploy.rs`](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/runtime/deploy.rs) (Deployment processing), [`arcella-core/src/manifest/mod.rs`](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/manifest/mod.rs) (Component manifests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Administration"]
  node_cli["CLI<br/>[main.rs]"]
  node_daemon["Daemon startup<br/>[main.rs]"]
  node_alme_server["ALME socket server<br/>[server.rs]"]
  node_alme_commands["ALME commands<br/>[commands.rs]"]
end

subgraph group_runtime["Runtime lifecycle"]
  node_runtime_api["Runtime API<br/>[mod.rs]"]
  node_installation["Component installation<br/>[install.rs]"]
  node_deployment["Deployment processing<br/>[deploy.rs]"]
  node_mutators["Lifecycle mutators<br/>[mutators.rs]"]
  node_runtime_state["Runtime state<br/>[state.rs]"]
  node_storage["Module storage<br/>[mod.rs]"]
end

subgraph group_definitions["Configuration and definitions"]
  node_configuration["Configuration loading<br/>[config_loader.rs]"]
  node_config_files["Configuration files<br/>[toml_files.rs]"]
  node_toml_parser["TOML parsing<br/>[toml.rs]"]
  node_component_manifest["Component manifests<br/>[mod.rs]"]
  node_deployment_spec["Deployment specifications<br/>[manifest.rs]"]
  node_interface_types["Component interfaces<br/>[interface_list.rs]"]
  node_module_identity["Module identity<br/>[module_id.rs]"]
  node_component_specs["Interface specifications<br/>[spec.rs]"]
  node_config_types["Configuration types<br/>[config.rs]"]
end

subgraph group_engine["Execution engine"]
  node_engine["Wasmtime engine<br/>[mod.rs]"]
  node_wasmtime_manifest["WASM manifest extraction<br/>[manifest.rs]"]
  node_wasmtime_conversion["Wasmtime conversions<br/>[from_wasmtime.rs]"]
end

node_admin_user(("Administrator"))

node_admin_user -->|"issues commands"| node_cli
node_admin_user -->|"sends requests"| node_alme_server
node_cli -->|"uses socket"| node_alme_server
node_daemon -->|"starts server"| node_alme_server
node_alme_server -->|"dispatches requests"| node_alme_commands
node_alme_server -->|"passes runtime"| node_runtime_api
node_alme_commands -->|"manages lifecycle"| node_runtime_api
node_runtime_api -->|"delegates install"| node_installation
node_runtime_api -->|"delegates deploy"| node_deployment
node_runtime_api -->|"delegates mutations"| node_mutators
node_runtime_api -->|"uses state"| node_runtime_state
node_installation -->|"updates state"| node_runtime_state
node_installation -->|"uses storage"| node_storage
node_deployment -->|"loads manifests"| node_component_manifest
node_deployment -->|"uses storage"| node_storage
node_deployment -->|"updates state"| node_runtime_state
node_mutators -->|"updates state"| node_runtime_state
node_mutators -->|"uses manifests"| node_component_manifest
node_configuration -->|"loads files"| node_config_files
node_configuration -->|"parses values"| node_toml_parser
node_component_manifest -->|"extracts WASM metadata"| node_wasmtime_manifest
node_component_manifest -->|"combines deployment data"| node_deployment_spec
node_deployment_spec -->|"identifies component"| node_module_identity
node_deployment_spec -->|"declares interfaces"| node_interface_types
node_interface_types -->|"stores item specs"| node_component_specs
node_runtime_api -.->|"executes components"| node_engine
node_engine -.->|"uses conversions"| node_wasmtime_conversion

click node_cli "https://github.com/arcellateam/arcella/blob/dev/arcella-cli/src/main.rs"
click node_daemon "https://github.com/arcellateam/arcella/blob/dev/arcella/src/main.rs"
click node_alme_server "https://github.com/arcellateam/arcella/blob/dev/arcella/src/alme/server.rs"
click node_alme_commands "https://github.com/arcellateam/arcella/blob/dev/arcella/src/alme/commands.rs"
click node_runtime_api "https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/runtime/mod.rs"
click node_installation "https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/runtime/install.rs"
click node_deployment "https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/runtime/deploy.rs"
click node_mutators "https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/runtime/mutators.rs"
click node_runtime_state "https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/runtime/state.rs"
click node_configuration "https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/config/config_loader.rs"
click node_config_files "https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/config/toml_files.rs"
click node_toml_parser "https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/utils/toml.rs"
click node_component_manifest "https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/manifest/mod.rs"
click node_deployment_spec "https://github.com/arcellateam/arcella/blob/dev/arcella-types/src/manifest.rs"
click node_interface_types "https://github.com/arcellateam/arcella/blob/dev/arcella-types/src/interface_list.rs"
click node_module_identity "https://github.com/arcellateam/arcella/blob/dev/arcella-types/src/module_id.rs"
click node_component_specs "https://github.com/arcellateam/arcella/blob/dev/arcella-types/src/spec.rs"
click node_config_types "https://github.com/arcellateam/arcella/blob/dev/arcella-types/src/config.rs"
click node_storage "https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/storage/mod.rs"
click node_engine "https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/engine/mod.rs"
click node_wasmtime_manifest "https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/wasmtime/manifest.rs"
click node_wasmtime_conversion "https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/wasmtime/from_wasmtime.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_daemon,node_alme_server,node_alme_commands toneBlue
class node_runtime_api,node_installation,node_deployment,node_mutators,node_runtime_state,node_storage toneAmber
class node_configuration,node_config_files,node_toml_parser,node_component_manifest,node_deployment_spec,node_interface_types,node_module_identity,node_component_specs,node_config_types toneMint
class node_engine,node_wasmtime_manifest,node_wasmtime_conversion toneRose
class node_admin_user toneIndigo
```

## Components

### Administration

- [CLI](https://github.com/arcellateam/arcella/blob/dev/arcella-cli/src/main.rs): `arcella-cli/src/main.rs`
- [Daemon startup](https://github.com/arcellateam/arcella/blob/dev/arcella/src/main.rs): `arcella/src/main.rs`
- [ALME socket server](https://github.com/arcellateam/arcella/blob/dev/arcella/src/alme/server.rs): `arcella/src/alme/server.rs`
- [ALME commands](https://github.com/arcellateam/arcella/blob/dev/arcella/src/alme/commands.rs): `arcella/src/alme/commands.rs`

### Runtime lifecycle

- [Runtime API](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/runtime/mod.rs): `arcella-core/src/runtime/mod.rs`
- [Component installation](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/runtime/install.rs): `arcella-core/src/runtime/install.rs`
- [Deployment processing](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/runtime/deploy.rs): `arcella-core/src/runtime/deploy.rs`
- [Lifecycle mutators](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/runtime/mutators.rs): `arcella-core/src/runtime/mutators.rs`
- [Runtime state](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/runtime/state.rs): `arcella-core/src/runtime/state.rs`
- [Module storage](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/storage/mod.rs): `arcella-core/src/storage/mod.rs`

### Configuration and definitions

- [Configuration loading](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/config/config_loader.rs): `arcella-core/src/config/config_loader.rs`
- [Configuration files](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/config/toml_files.rs): `arcella-core/src/config/toml_files.rs`
- [TOML parsing](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/utils/toml.rs): `arcella-core/src/utils/toml.rs`
- [Component manifests](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/manifest/mod.rs): `arcella-core/src/manifest/mod.rs`
- [Deployment specifications](https://github.com/arcellateam/arcella/blob/dev/arcella-types/src/manifest.rs): `arcella-types/src/manifest.rs`
- [Component interfaces](https://github.com/arcellateam/arcella/blob/dev/arcella-types/src/interface_list.rs): `arcella-types/src/interface_list.rs`
- [Module identity](https://github.com/arcellateam/arcella/blob/dev/arcella-types/src/module_id.rs): `arcella-types/src/module_id.rs`
- [Interface specifications](https://github.com/arcellateam/arcella/blob/dev/arcella-types/src/spec.rs): `arcella-types/src/spec.rs`
- [Configuration types](https://github.com/arcellateam/arcella/blob/dev/arcella-types/src/config.rs): `arcella-types/src/config.rs`

### Execution engine

- [Wasmtime engine](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/engine/mod.rs): `arcella-core/src/engine/mod.rs`
- [WASM manifest extraction](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/wasmtime/manifest.rs): `arcella-core/src/wasmtime/manifest.rs`
- [Wasmtime conversions](https://github.com/arcellateam/arcella/blob/dev/arcella-core/src/wasmtime/from_wasmtime.rs): `arcella-core/src/wasmtime/from_wasmtime.rs`

### Other components

- **Administrator**

## Connections

- Administrator → CLI: issues commands
- Administrator → ALME socket server: sends requests
- CLI → ALME socket server: uses socket
- Daemon startup → ALME socket server: starts server (evidence: `arcella/src/main.rs`)
- ALME socket server → ALME commands: dispatches requests (evidence: `arcella/src/alme/server.rs`)
- ALME socket server → Runtime API: passes runtime (evidence: `arcella/src/alme/server.rs`)
- ALME commands → Runtime API: manages lifecycle
- Runtime API → Component installation: delegates install (evidence: `arcella-core/src/runtime/mod.rs`)
- Runtime API → Deployment processing: delegates deploy (evidence: `arcella-core/src/runtime/mod.rs`)
- Runtime API → Lifecycle mutators: delegates mutations (evidence: `arcella-core/src/runtime/mod.rs`)
- Runtime API → Runtime state: uses state (evidence: `arcella-core/src/runtime/mod.rs`)
- Component installation → Runtime state: updates state (evidence: `arcella-core/src/runtime/install.rs`)
- Component installation → Module storage: uses storage (evidence: `arcella-core/src/runtime/install.rs`)
- Deployment processing → Component manifests: loads manifests (evidence: `arcella-core/src/runtime/deploy.rs`)
- Deployment processing → Module storage: uses storage (evidence: `arcella-core/src/runtime/deploy.rs`)
- Deployment processing → Runtime state: updates state (evidence: `arcella-core/src/runtime/deploy.rs`)
- Lifecycle mutators → Runtime state: updates state (evidence: `arcella-core/src/runtime/mutators.rs`)
- Lifecycle mutators → Component manifests: uses manifests (evidence: `arcella-core/src/runtime/mutators.rs`)
- Configuration loading → Configuration files: loads files (evidence: `arcella-core/src/config/config_loader.rs`)
- Configuration loading → TOML parsing: parses values (evidence: `arcella-core/src/config/config_loader.rs`)
- Component manifests → WASM manifest extraction: extracts WASM metadata (evidence: `arcella-core/src/manifest/mod.rs`)
- Component manifests → Deployment specifications: combines deployment data
- Deployment specifications → Module identity: identifies component (evidence: `arcella-types/src/manifest.rs`)
- Deployment specifications → Component interfaces: declares interfaces (evidence: `arcella-types/src/manifest.rs`)
- Component interfaces → Interface specifications: stores item specs (evidence: `arcella-types/src/interface_list.rs`)
- Runtime API → Wasmtime engine: executes components
- Wasmtime engine → Wasmtime conversions: uses conversions
