scaffold: M0 skeleton + agent onboarding (build, architecture, progress)
Turn the design into a buildable, dependency-free M0 skeleton plus the
onboarding layer so a new agent can pick up instantly.
Build system:
- CMake + CMakePresets (dev = no deps; server-release = vcpkg) + vcpkg.json
- Skeleton builds with just a C++20 compiler; deps stay off until needed
- .gitattributes (LF), .gitignore, .clang-format
Core (libvoicecat):
- core/include/voicecat.h: full C ABI (the client/server contract), stubbed
- core/proto/voicecat.proto: control-plane wire format, matches docs/protocol.md
- src/{net,crypto,codec,protocol,session,audio,core}: subsystem stubs that
return VC_ERR_NOT_IMPLEMENTED, each pointing to its design doc
- server/ (voicecat-server) and tools/vccli/ link the core
- tests/: CTest smoke test asserting the C ABI contract (behavior, not just build)
- clients/{apple,windows}: M4 placeholders
Onboarding for agents:
- CLAUDE.md: hub — build/test commands, architecture at a glance, doc map, rules
- AGENTS.md: working method (behavior-driven; clean compile is the floor not the goal)
- PROGRESS.md: living tracker — M0 done, M1 task checklist, "where we left off"
Verified: cmake --preset dev && cmake --build --preset dev && ctest --preset dev → green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 21:09:09 +02:00
|
|
|
# Apple client (macOS + iOS) — placeholder
|
|
|
|
|
|
|
|
|
|
Built in **M4** (see [`docs/roadmap.md`](../../docs/roadmap.md)). Swift + SwiftUI, consuming
|
|
|
|
|
`libvoicecat` through the C ABI ([`core/include/voicecat.h`](../../core/include/voicecat.h)).
|
|
|
|
|
|
|
|
|
|
Planned shape (see [`docs/architecture.md`](../../docs/architecture.md) §4 and
|
|
|
|
|
[`docs/tech-stack.md`](../../docs/tech-stack.md) §2):
|
|
|
|
|
|
|
|
|
|
- A Swift Package wrapping the core as an **XCFramework** (macOS + iOS device + simulator).
|
|
|
|
|
- A module map exposing `voicecat.h` to Swift (Swift can also use C++ interop directly, but
|
|
|
|
|
the C ABI is the stable contract).
|
|
|
|
|
- SwiftUI app target for macOS and iOS.
|
|
|
|
|
- **iOS audio:** app owns `AVAudioSession` (`.playAndRecord` / `.voiceChat`), mic permission,
|
|
|
|
|
interruption/route handling, calling `vc_audio_*` hooks on the core.
|
|
|
|
|
- **iOS screen/system audio (`SCREEN_AUDIO`):** a **ReplayKit Broadcast Upload Extension**
|
|
|
|
|
capturing `RPSampleBufferType.audioApp`, linking a minimal core slice, sharing session
|
|
|
|
|
state via an **App Group** ([`docs/voice.md`](../../docs/voice.md) §9).
|
|
|
|
|
|
|
|
|
|
Nothing here yet — the core must reach M2 (working voice) before the GUI is worth building.
|
build(cmake): clean up presets, add release/apple presets, cross-platform triplets
Rationalize the preset set to match the project's actual state (past M5):
- Rename dev->skeleton (no-deps stub smoke), m1-dev->dev (default dev preset)
- Drop m2-dev (cache-identical to m1-dev)
- Add release preset (optimized + tests on, symbols kept)
- Strip server-release binaries (-s linker flag)
- Add apple-dev/apple-ios/apple-ios-sim scaffolding presets for XCFramework
Add cmake/voicecat-toolchain.cmake wrapper that auto-resolves the vcpkg
triplet from the host platform (x64-mingw-static/x64-linux/arm64-osx) so
the main presets work on Windows/Linux/macOS without per-OS variants.
Update all docs (building.md, CLAUDE.md, README.md, AGENTS.md, deployment.md,
tech-stack.md, client READMEs) and stale preset-name references in code
comments. No C++ behavior changes — the core was already portable.
2026-06-18 03:16:01 +02:00
|
|
|
|
|
|
|
|
## Building the core for Apple platforms (scaffolding)
|
|
|
|
|
|
|
|
|
|
The CMake presets `apple-dev`, `apple-ios`, and `apple-ios-sim` produce static `libvoicecat.a`
|
|
|
|
|
slices for the Swift Package / XCFramework. They are **scaffolding** — not yet CI-validated.
|
|
|
|
|
Build on macOS (they won't work on Windows/Linux):
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Prerequisites: VCPKG_ROOT set, Xcode + iOS SDK installed
|
|
|
|
|
export VCPKG_ROOT=/path/to/vcpkg
|
|
|
|
|
|
|
|
|
|
# macOS slice (arm64-osx on Apple Silicon, x64-osx on Intel)
|
|
|
|
|
cmake --preset apple-dev && cmake --build --preset apple-dev
|
|
|
|
|
# → build/apple-dev/lib/libvoicecat.a
|
|
|
|
|
|
|
|
|
|
# iOS device slice
|
|
|
|
|
cmake --preset apple-ios && cmake --build --preset apple-ios
|
|
|
|
|
# → build/apple-ios/lib/libvoicecat.a
|
|
|
|
|
|
|
|
|
|
# iOS simulator slice
|
|
|
|
|
cmake --preset apple-ios-sim && cmake --build --preset apple-ios-sim
|
|
|
|
|
# → build/apple-ios-sim/lib/libvoicecat.a
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The three `.a` files are then stitched into an XCFramework:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
xcodebuild -create-xcframework \
|
|
|
|
|
-library build/apple-dev/lib/libvoicecat.a -headers core/include \
|
|
|
|
|
-library build/apple-ios/lib/libvoicecat.a -headers core/include \
|
|
|
|
|
-library build/apple-ios-sim/lib/libvoicecat.a -headers core/include \
|
|
|
|
|
-output build/VoiceCatCore.xcframework
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The XCFramework is then consumed by the Swift Package as a binary target. Actual
|
|
|
|
|
`AVAudioSession` integration, `Info.plist` mic permission, ReplayKit extension, and SwiftUI
|
|
|
|
|
UI work are tracked as follow-up tasks — the presets exist so the build entry point is ready.
|