> ## Documentation Index
> Fetch the complete documentation index at: https://supastack.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For the full documentation corpus in one file, fetch: https://supastack.dev/llms-full.txt

# Desktop 技术栈

Tauri 外壳内部的技术以及各自的角色。

## 开始之前

Desktop 应用刻意保持精简：Rust 核心掌管原生窗口，webview 加载您的 web 应用。下面的一切都已在 checkout 中锁定——本页解释每个部分的作用，便于理解后面的指南。

产品界面、认证、计费和 AI 都位于窗口所加载的 web 代码库中。仅含 Desktop 的 checkout 只有外壳——这正是此技术栈刻意保持精简的原因。


## Tauri 2 + 系统 webview

Tauri 2 用操作系统自带的 webview 渲染应用——Windows 上的 WebView2、macOS 上的 WebKit、Linux 上的 WebKitGTK——因此外壳保持精简，不捆绑浏览器运行时。`frontendDist` 指向 `apps/desktop/ui`，即 web 应用加载期间显示的启动页，冷启动绝不会渲染空白窗口。

- [Tauri](https://tauri.app)


## Rust + TypeScript

外壳的行为由 Rust 实现——`src-tauri/src`，edition 2021，最低 Rust 1.90——由 cargo 构建。用 TypeScript 编写的小型 Node 脚本负责发布预检和更新器清单。

- [Rust](https://www.rust-lang.org)


## 通过插件提供原生功能

窗口状态、单实例、deep link、全局快捷键、托盘、开机自启、更新器、外部链接打开、对话框和进程控制都来自 `tauri-plugin-*` crate——外壳没有自定义 IPC 命令。新增原生能力意味着再注册一个插件或接线已有的插件。


## tauri.conf.json + capabilities

包标识符 `com.supastack.desktop`、窗口列表、插件选项和更新器端点位于 `src-tauri/tauri.conf.json`。Webview 权限在 `src-tauri/capabilities/default.json` 中——目前是 `core:default` 加上用于系统浏览器链接的 `opener:allow-open-url`——只有在原生功能需要时才扩大。


## 验证工具

cargo test 覆盖 Rust 逻辑——URL 解析、导航门禁、deep-link 映射、更新器通道、缩放和窗口偏好——`node --check` 校验启动页，`check:release-config` 守住发布构建。CI 会构建全部三个操作系统。

```
corepack pnpm --filter @supastack/desktop test
corepack pnpm --filter @supastack/desktop typecheck
corepack pnpm --filter @supastack/desktop check:release-config
```


## 下一篇

[运行并配置外壳](https://supastack.dev/zh/docs/desktop/run.md)
