CHAPTER 12 · SOURCE MAP
79개 Workspace 멤버가 하나의 제품을 구성하는 방법
루트 Cargo.toml에는 79개의 멤버가 나열되어 있으며, 그중 62개가 crates/codegen/에 속합니다. 이 시스템을 이해하려면 조합 진입점, 상호작용 레이어, Agent 호스트, 도메인 역량, 추론 상태의 다섯 가지 주축을 따라 읽어야 합니다.
학습 목표
루트 workspace 매니페스트에서 제품의 주축을 파악하고, 바이너리 조합 진입점, TUI 라이브러리, Shell Agent 호스트, 세션 상태 컴포넌트를 구별할 수 있습니다.
루트 workspace 매니페스트에서 제품의 주축을 파악하고, 바이너리 조합 진입점, TUI 라이브러리, Shell Agent 호스트, 세션 상태 컴포넌트를 구별할 수 있습니다.
핵심 시각 자료 · 교육용 구조 다이어그램
79
Workspace members
루트 매니페스트의 실제 멤버 수입니다. 루트 파일 첫 줄에 자동 생성된 workspace root임이 명시되어 있습니다.
62
Codegen members
대부분이 crates/codegen/에 집중되어 있으며, build, common, prod, third_party도 있습니다.
5
읽기 주축
조합 진입점, TUI, Shell 호스트, 도메인 역량, 추론 및 상태 — 가상의 4계층 디렉토리 구조를 투영하지 마세요.
실제 소스 코드 증거
Cargo.toml
# Auto-generated workspace root.
[workspace]
resolver = "2"
members = [
"crates/build/xai-proto-build",
"crates/codegen/xai-grok-pager-bin",
"crates/codegen/xai-grok-shell",
...
]
[workspace]
resolver = "2"
members = [
"crates/build/xai-proto-build",
"crates/codegen/xai-grok-pager-bin",
"crates/codegen/xai-grok-shell",
...
]
crates/codegen/xai-grok-pager-bin/Cargo.toml
# Composition-root binary for the Grok Build TUI.
[[bin]]
name = "xai-grok-pager"
path = "src/main.rs"
# Agent runtime + leader/stdio/headless entry points.
xai-grok-shell = { workspace = true }
[[bin]]
name = "xai-grok-pager"
path = "src/main.rs"
# Agent runtime + leader/stdio/headless entry points.
xai-grok-shell = { workspace = true }
소스 코드 스냅샷 설명: 이 페이지는 로컬에 동기화된 사본을 기준으로 검증되었습니다. 해당 사본에는
.git 메타데이터가 없으므로 특정 commit 버전을 특정하지 않습니다.수업 실습
01
의존성을 따라 역할 파악하기
xai-grok-pager-bin/Cargo.toml에서 출발하여 TUI 라이브러리와 Agent 호스트 의존성을 각각 찾아보세요. 그 다음 xai-grok-sampler/src/actor/mod.rs와 xai-chat-state/src/actor/mod.rs에서 각각이 소유하는 상태를 기록하세요.
Takeaway: 79개 멤버는 workspace의 사실이고, 62개 codegen 멤버는 수량의 사실입니다. 제품의 런타임 주축은
pager-bin 조합 진입점에서 pager, shell, 도메인 crate, sampler, chat-state까지 이어집니다.