Files
mrp-simulator-harmonyos/docs/architecture/ARCHITECTURE_V1.md
T

26 lines
735 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 第一轮架构判断
## 推荐架构
- ArkTS:应用壳、页面、设置、文件导入、生命周期编排
- NAPI:ArkTS 与 Native 之间的粗粒度桥接层
- C++:模拟器核心、事件循环、渲染、输入归一化、音频、文件系统适配
## 推荐分层
1. 壳层(ArkTS)
2. 模拟器核心(C++)
3. 平台适配层(C++ / 少量 ArkTS 配合)
4. 测试与调试支撑模块
## 当前关键边界
- UI 与运行时隔离
- 高性能逻辑不放 ArkTS 主线程
- 服务端不进入一期运行时闭环
- 兼容补丁机制需预留
## 主要风险
- ArkTS 性能不足
- 渲染链路瓶颈
- 音频延迟/同步问题
- 生命周期切换导致状态错乱
- NAPI 引入后维护复杂度上升