Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

BUILD

This guide covers the commands that match the current workspace layout and tooling.

Build map

flowchart TD
    SRC[Workspace source] --> CARGO[cargo build --workspace]
    SRC --> CLI[cargo build -p antikythera-cli --release]
    SRC --> WIT[cargo run -p build-scripts --release -- wit]
    WIT --> COMPONENT[cargo component build -p antikythera-sdk --release --target wasm32-wasip1]

What you can build

TargetStatusNotes
Workspace cratescargo build --workspace
antikythera native binarystdio, setup, and multi-agent modes
antikythera-config native binaryProvider and server config management
antikythera-sdk component buildSingle WASM output via cargo-component + wasm32-wasip1

Prerequisites

  • Rust 1.75+
  • cargo-component for component builds
  • Optional: wasm-tools for inspecting the generated component
  • Optional: task for the helpers in Taskfile.yml

Native builds

Build everything

cargo build --workspace

Build release artifacts

cargo build --workspace --release

Build only the CLI crate

cargo build -p antikythera-cli --release

Native binaries

BinaryCommand
antikytheracargo run -p antikythera-cli --bin antikythera
antikythera-configcargo run -p antikythera-cli --bin antikythera-config -- --help

WASM component build

Generate WIT

cargo run -p build-scripts --release -- wit

This generates:

wit/antikythera.wit

Build the WASM component

cargo component build -p antikythera-sdk --release --target wasm32-wasip1 \
  --no-default-features --features component

The helper binary in scripts/build-component.rs also supports:

cargo run -p build-scripts --release -- component
cargo run -p build-scripts --release -- all

Expected component output is produced under:

target/wasm32-wasip1/release/

Canonical artifact name for CI/release packaging:

dist/antikythera-sdk.wasm

CLI harness against WASM

Use the CLI to execute the generated WASM via host runtime bridge (WasmAgentRunner):

cargo run -p antikythera-cli --bin antikythera -- \
    --mode wasm-harness \
    --wasm target/wasm32-wasip1/release/antikythera_sdk.wasm \
    --task "Smoke test"

Optional deterministic host callback payload:

cargo run -p antikythera-cli --bin antikythera -- \
    --mode wasm-harness \
    --wasm target/wasm32-wasip1/release/antikythera_sdk.wasm \
    --wasm-llm-response '{"content":"ok","model":"stub"}'

Docs site build

The repository also includes an mdBook configuration that turns README.md plus the documentation/ folder into a static documentation site.

flowchart LR
    README[README.md] --> SUMMARY[SUMMARY.md]
    DOCS[documentation/*.md] --> SUMMARY
    SUMMARY --> MDBOOK[mdbook build]
    MDBOOK --> SITE[book/]
    SITE --> PAGES[GitHub Pages deployment]

Local commands

# Build static site
mdbook build

# Preview locally
mdbook serve --open

Tests and quality checks

Verification flow

flowchart LR
    CHECK[cargo check --workspace] --> TEST[cargo test --workspace]
    TEST --> FMT[cargo fmt --all]
    FMT --> CLIPPY[cargo clippy --workspace -- -D warnings]

Workspace-wide

cargo test --workspace
cargo fmt --all
cargo clippy --workspace -- -D warnings

Common targeted checks

# SDK library tests
cargo test -p antikythera-sdk --lib

# Check all crates without producing binaries
cargo check --workspace

Taskfile helpers

The repository includes Taskfile.yml for common flows.

TaskPurpose
task buildBuild the WASM component
task build-cliBuild the native CLI binary
task build-allBuild both native CLI and WASM outputs
task witGenerate WIT
task runRun the CLI crate
task testRun workspace tests
task checkRun cargo check --workspace
task lintRun Clippy
task formatRun rustfmt
task inspectInspect the built component with wasm-tools if installed
task sizeShow binary sizes

GitHub workflows

WorkflowPurpose
.github/workflows/wasm.ymlBuilds the WASM component and generated WIT on pushes, pull requests, and manual runs
.github/workflows/release.ymlBuilds release-grade artifacts on version tags and publishes to GitHub Releases

Feature flags overview

antikythera-core

FeaturePurpose
native-transportOS process and stdio transport support
gcpGoogle Cloud-related integrations
wasm-runtimeSandboxed WASM execution support
cachePostcard-based configuration cache
wizardInteractive setup and wizard-related dependencies
multi-agentMulti-agent orchestration support
fullEnables the full capability set

antikythera-sdk

FeaturePurpose
wasmWASM bindings via WIT (server-side, wasm32-wasip1)
componentWASM Component Model support
wasm-configWASM configuration binary format support
single-agentSingle-agent support
multi-agentMulti-agent support
cloudCloud-related integrations
wasm-sandboxWASM sandbox support
fullBroad feature bundle for the SDK/core stack

Notes

  • The component build (wasm32-wasip1) is the WASM deployment target. Use it when embedding agent logic in a host application via wasmtime.
  • For browser or C FFI targets, implement those in the host application itself — the framework does not provide those bindings.