Files
telegram-tui/docs/IOS_CORE_REUSE.md
2026-05-20 00:31:18 +03:00

29 lines
1.2 KiB
Markdown

# iOS core reuse
Первый workspace split готовит код к будущему iOS-клиенту, но не добавляет
Swift, SwiftUI, UniFFI, C ABI или XCFramework.
## Уже в `tele-core`
- Typed IDs и shared domain-типы: `types`.
- TDLib client wrapper, auth/chats/messages/reactions/users/update handling.
- `TdClientConfig` и `TdCredentials`: credentials передаются явно из клиента.
- Core-neutral `IncomingMessageEvent` вместо прямой зависимости от desktop notifications.
- Pure message grouping.
- Pure account profile structs and validation.
- Reusable `FakeTdClient` and TDLib test data.
## Остаётся TUI-only
- `ratatui`, `crossterm`, UI state, input handling and snapshots.
- Runtime config loading, `.env`, `accounts.toml`, XDG/macOS paths and lock files.
- Desktop notifications, clipboard, URL opening, terminal images and `ffplay`.
- PTY fixture and `termwright` E2E tests.
## Следующий этап
1. Decide the iOS-facing API shape on top of `tele-core`.
2. Add UniFFI or a C ABI only after the Rust boundary is stable.
3. Validate TDLib linking and database paths for `aarch64-apple-ios`.
4. Keep platform delivery concerns outside `tele-core`.