Files
nexus/wiki/concepts/SwiftTerm.md
2026-04-20 09:58:08 +08:00

34 lines
926 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.
---
title: "SwiftTerm"
type: concept
tags: [swift, terminal, library, mit-license]
---
## 定义
SwiftTerm 是用 Swift 编写的终端仿真库MIT 许可证),为 macOS、iOS 和 visionOS 应用提供完整的终端仿真功能,是 The Agency 项目中 Terminal Integration Specialist 的核心技术栈。
## 核心特性
- SwiftUI 深度集成
- VT100/xterm 完整支持
- UTF-8/Unicode 字符渲染
- 文本选择和复制
- 主题定制
## 技术栈
- 渲染Core Graphics、Core Text
- 输入UIKit/AppKit 事件处理
- 集成SSH 流桥接SwiftNIO SSH、NMSSH
## API 概览
- SwiftUI View 组件
- Input/Output Stream 处理
- Theme 配置接口
- Selection Handler
## 相关资源
- GitHub: https://github.com/migueldeicaza/SwiftTerm
- API Docs: https://migueldeicaza.github.io/SwiftTerm/
## 相关概念
- [[Terminal Emulation]]:终端仿真基础
- [[SSH Integration]]SSH 集成模式