Tauri

Tauri 是一个框架,用于为所有主要桌面平台构建小巧、快速的二进制文件

README

Tauri
status License test library FOSSA Status Chat Server website https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg support

当前版本


核心


结构描述版本LinWinMac
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[**tauri**](https://github.com/tauri-apps/tauri/tree/dev/core/tauri)runtime[![](https://img.shields.io/crates/v/tauri.svg)](https://crates.io/crates/tauri)
[**tauri-build**](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-build)applies[![](https://img.shields.io/crates/v/tauri-build.svg)](https://crates.io/crates/tauri-build)
[**tauri-codegen**](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-codegen)handles[![](https://img.shields.io/crates/v/tauri-codegen.svg)](https://crates.io/crates/tauri-codegen)
[**tauri-macros**](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-macros)creates[![](https://img.shields.io/crates/v/tauri-macros.svg)](https://crates.io/crates/tauri-macros)
[**tauri-runtime**](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-runtime)layer[![](https://img.shields.io/crates/v/tauri-runtime.svg)](https://crates.io/crates/tauri-runtime)
[**tauri-runtime-wry**](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-runtime-wry)enables[![](https://img.shields.io/crates/v/tauri-runtime-wry.svg)](https://crates.io/crates/tauri-runtime-wry)
[**tauri-utils**](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-utils)common[![](https://img.shields.io/crates/v/tauri-utils.svg)](https://crates.io/crates/tauri-utils)

工具


结构描述版本LinWinMac
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[**bundler**](https://github.com/tauri-apps/tauri/tree/dev/tooling/bundler)manufacture[![](https://img.shields.io/crates/v/tauri-bundler.svg)](https://crates.io/crates/tauri-bundler)
[**api.js**](https://github.com/tauri-apps/tauri/tree/dev/tooling/api)JS[![](https://img.shields.io/npm/v/@tauri-apps/api.svg)](https://www.npmjs.com/package/@tauri-apps/api)
[**cli.rs**](https://github.com/tauri-apps/tauri/tree/dev/tooling/cli)create,[![](https://img.shields.io/crates/v/tauri-cli.svg)](https://crates.io/crates/tauri-cli)
[**cli.js**](https://github.com/tauri-apps/tauri/tree/dev/tooling/cli/node)Node.js[![](https://img.shields.io/npm/v/@tauri-apps/cli.svg)](https://www.npmjs.com/package/@tauri-apps/cli)

公用程序和插件


结构描述版本LinWinMac
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[**create-tauri-app**](https://github.com/tauri-apps/create-tauri-app)Get[![](https://img.shields.io/npm/v/create-tauri-app.svg)](https://www.npmjs.com/package/create-tauri-app)
[**vue-cli-plugin-tauri**](https://github.com/tauri-apps/vue-cli-plugin-tauri/)Vue[![](https://img.shields.io/npm/v/vue-cli-plugin-tauri.svg)](https://www.npmjs.com/package/vue-cli-plugin-tauri)

介绍


Tauri是一个框架,用于为所有主要桌面平台构建小巧、快速的二进制文件。开发人员可以集成任何可编译为HTML、JS和CSS的前端框架来构建用户界面。应用程序的后端是一个rust-sourced的二进制文件,前端可以与之交互。

Tauri应用程序中的用户界面目前利用[tao](https://docs.rs/tao)作为macOS和Windows上的窗口处理库,以及[gtk](https://gtk-rs.org/docs/gtk/)通过Tauri团队在Linux上孵化和维护WRY,它利用macOS上的WebKit、Windows上的WebView2和Linux上的WebKitGTK,创建了系统webview(以及菜单和任务栏等其他功能)的统一界面。

要了解有关所有这些细节如何组合在一起的详细信息,请参阅ARCHITECTURE.md文件。

入门


如果您有兴趣制作tauri应用程序,请访问documentation website. 本自述面向那些对核心库有兴趣的人。但如果你只是想快速在开发中重写“tauri”,在这里:

平台


Tauri目前支持以下平台的开发和分布:

| 平台                 | 版本        |
| :----------------------- | :-------------- |
| Windows                  | 7 and above     |
| macOS                    | 10.15 and above |
| Linux                    | See below       |
| iOS/iPadOS (coming soon) |                 |
| Android (coming soon)    |                 |

Linux 支持

有关开发Tauri应用程序的信息,请参阅[Tauri.app入门指南](https://tauri.app/v1/guides/getting-started/prerequisites#setting-up-linux)。

对于运行的Tauri应用程序,我们支持以下配置(这些配置会自动添加为.deb的依赖项,并绑定到AppImage,以便用户无需手动安装):

- Debian(Ubuntu 18.04及以上版本或同等版本),安装了以下软件包:
- `libwebkit2gtk-4.0-37`, `libgtk-3-0`, `libayatana-appindicator3-1`1
- Arch 安装了以下软件包:
- `webkit2gtk`, `gtk3`, `libayatana-appindicator`1
- Fedora (latest 2 versions) 安装了以下软件包:
- `webkit2gtk3`, `gtk3`, `libappindicator-gtk3`11 `appindicator` 仅当使用系统托盘时才需要

特征


- [x] Desktop Bundler (.app, .dmg, .deb, AppImage, .msi)
- [x] Self Updater
- [x] App Signing
- [x] Native Notifications (toast)
- [x] App Tray
- [x] Core Plugin System
- [x] Scoped Filesystem
- [x] Sidecar

安全特征


- [x] localhost-free (:fire:)
- [x] custom protocol for secure mode
- [x] Dynamic ahead of Time Compilation (dAoT) with functional tree-shaking
- [x] functional Address Space Layout Randomization
- [x] OTP salting of function names and messages at runtime
- [x] CSP Injection

实用工具


- [x] Rust-based CLI
- [x] GH Action for creating binaries for all platforms
- [x] VS Code Extension

开发


Tauri是一个由多个模块组成的系统:

基础设施


- Git 用于代码管理
- GitHub 用于项目托管
- GitHub CI、CD操作
- Discord for discussions
- Netlify-hosted 文档托管
- DigitalOcean Meilisearch 实例

Operating systems


Tauri core can be developed on Mac, Linux and Windows, but you are encouraged to use the latest possible operating systems and build tools for your OS.

Contributing


Before you start working on something, it's best to check if there is an existing issue first. It's also a good idea to stop by the Discord server and confirm with the team if it makes sense or if someone else is already working on it.

Please make sure to read the Contributing Guide before making a pull request.

Thank you to everyone contributing to Tauri!

Documentation


Documentation in a polyglot system is a tricky proposition. To this end, we prefer to use inline documentation of Rust code and at JSDoc in typescript / javascript code. We autocollect these and publish them using Docusaurus v2 and netlify. Here is the hosting repository for the documentation site: https://github.com/tauri-apps/tauri-docs

Testing & Linting


Test all the things! We have a number of test suites, but are always looking to improve our coverage:

- Rust (cargo test) => sourced via inline #[cfg(test)] declarations
- Typescript (jest) => via spec files
- Smoke Tests (run on merges to latest)
- eslint, clippy

CI/CD


We recommend you read this article to understand better how we run our pipelines: https://www.jacobbolda.com/setting-up-ci-and-cd-for-tauri/

Organization


Tauri aims to be a sustainable collective based on principles that guide sustainable free and open software communities. To this end it has become a Programme within the Commons Conservancy, and you can contribute financially via Open Collective.

Semver


tauri is following Semantic Versioning 2.0.

Licenses


Code: (c) 2015 - 2021 - The Tauri Programme within The Commons Conservancy.

MIT or MIT/Apache 2.0 where applicable.

Logo: CC-BY-NC-ND

- Original Tauri Logo Designs by Alve Larsson, Daniel Thompson-Yvetot and Guillaume Chau
FOSSA Status