diff --git a/src/components/sponsors/SponsorList.astro b/src/components/sponsors/SponsorList.astro
new file mode 100644
index 0000000000..c305d2df1c
--- /dev/null
+++ b/src/components/sponsors/SponsorList.astro
@@ -0,0 +1,64 @@
+---
+import OpenCollective from './OpenCollective/Collective.astro';
+import GitHubSponsor from './GitHub/Sponsors.astro';
+import Partners from './Partners.astro';
+import OfficialPartners from './OfficialPartners.astro';
+---
+
+
+
+
+
Supported by
+
+
+
+
Open Collective Sponsors
+
+
+
+
GitHub Sponsors
+
+
+
+
+
+
Website powered by
+
+
+
+
+
diff --git a/src/content.config.ts b/src/content.config.ts
new file mode 100644
index 0000000000..3912141897
--- /dev/null
+++ b/src/content.config.ts
@@ -0,0 +1,15 @@
+import { defineCollection } from 'astro:content';
+import { i18nSchema, docsSchema } from '@astrojs/starlight/schema';
+import { docsLoader, i18nLoader } from '@astrojs/starlight/loaders';
+import { topicSchema } from 'starlight-sidebar-topics/schema';
+import { blogSchema } from 'starlight-blog/schema';
+
+export const collections = {
+ docs: defineCollection({
+ loader: docsLoader(),
+ schema: docsSchema({
+ extend: (context) => blogSchema(context).merge(topicSchema),
+ }),
+ }),
+ i18n: defineCollection({ loader: i18nLoader(), schema: i18nSchema() }),
+};
diff --git a/src/content/config.ts b/src/content/config.ts
deleted file mode 100644
index da3de68edf..0000000000
--- a/src/content/config.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { defineCollection } from 'astro:content';
-import { i18nSchema } from '@astrojs/starlight/schema';
-import { docsSchema } from 'src/schemas/docsSchema';
-
-export const collections = {
- docs: defineCollection({
- schema: docsSchema,
- }),
- i18n: defineCollection({ type: 'data', schema: i18nSchema() }),
-};
diff --git a/src/content/docs/404.md b/src/content/docs/404.md
index ce8f1b4743..23668155c3 100644
--- a/src/content/docs/404.md
+++ b/src/content/docs/404.md
@@ -1,5 +1,6 @@
---
title: '404'
+topic: guides # this sidebar is active when viewing this page
template: doc
editUrl: false
tableOfContents: false
diff --git a/src/content/docs/_fragments/cta.mdx b/src/content/docs/_fragments/cta.mdx
index b2f7167b07..a92c8f424f 100644
--- a/src/content/docs/_fragments/cta.mdx
+++ b/src/content/docs/_fragments/cta.mdx
@@ -1,3 +1,7 @@
+---
+title: 'Create Tauri app'
+---
+
import { Tabs, TabItem } from '@astrojs/starlight/components';
@@ -11,6 +15,11 @@ sh <(curl https://create.tauri.app/sh)
irm https://create.tauri.app/ps | iex
```
+
+```sh frame=none
+sh (curl -sSL https://create.tauri.app/sh | psub)
+```
+
```sh frame=none
npm create tauri-app@latest
diff --git a/src/content/docs/blog/create-tauri-app-version-3-released.md b/src/content/docs/blog/create-tauri-app-version-3-released.md
index 2f1339072d..00bc284fd5 100644
--- a/src/content/docs/blog/create-tauri-app-version-3-released.md
+++ b/src/content/docs/blog/create-tauri-app-version-3-released.md
@@ -4,10 +4,6 @@ date: 2023-03-01
authors: [amrbashir]
excerpt: create-tauri-app Version 3 is released with support for alpha versions of Tauri, mobile project support and DX improvements
image: ./create-tauri-app-version-3-released/header.jpg
-banner:
- content: |
- You're reading the blog on the prerelease site for Tauri 2.0 -
- Go to the Tauri 1.0 site
---

diff --git a/src/content/docs/blog/cve-2024-24576.md b/src/content/docs/blog/cve-2024-24576.md
index 153e07f55e..21a44dca94 100644
--- a/src/content/docs/blog/cve-2024-24576.md
+++ b/src/content/docs/blog/cve-2024-24576.md
@@ -3,10 +3,6 @@ title: Rust Security Advisory CVE-2024-24576
date: 2024-04-10
authors: [tweidinger, chip]
excerpt: Recent Rust Security Advisory CVE-2024-24576.
-banner:
- content: |
- You're reading the blog on the prerelease site for Tauri 2.0 -
- Go to the Tauri 1.0 site
---
The Rust Security Response WG announced [`CVE-2024-24576`](https://blog.rust-lang.org/2024/04/09/cve-2024-24576.html), which affects the Rust Standard Library on Windows.
diff --git a/src/content/docs/blog/partnership-crabnebula.md b/src/content/docs/blog/partnership-crabnebula.md
index adc305bfa3..d5d4a4c763 100644
--- a/src/content/docs/blog/partnership-crabnebula.md
+++ b/src/content/docs/blog/partnership-crabnebula.md
@@ -3,10 +3,6 @@ title: 'Strengthening Tauri: Our Partnership with CrabNebula'
date: 2023-11-13
authors: [nothingismagick]
excerpt: "As an open-source project, Tauri's primary mission has always been to provide a secure, efficient framework for multi-platform application development. Understanding the concerns and needs of our community, we are excited to share insights into our partnership with CrabNebula and how it bolsters the stability and future of Tauri."
-banner:
- content: |
- You're reading the blog on the prerelease site for Tauri 2.0 -
- Go to the Tauri 1.0 site
---

diff --git a/src/content/docs/blog/roadmap-to-tauri-2-0.md b/src/content/docs/blog/roadmap-to-tauri-2-0.md
index 2d27802941..60e84a399a 100644
--- a/src/content/docs/blog/roadmap-to-tauri-2-0.md
+++ b/src/content/docs/blog/roadmap-to-tauri-2-0.md
@@ -3,10 +3,6 @@ title: Roadmap to Tauri 2.0
date: 2023-09-07
authors: [lorenzolewis]
excerpt: 'Tauri 1.0 was released in June 2022 and introduced an app toolkit for developers to build apps using HTML, CSS, and JavaScript with the security and performance of Rust.'
-banner:
- content: |
- You're reading the blog on the prerelease site for Tauri 2.0 -
- Go to the Tauri 1.0 site
---

diff --git a/src/content/docs/blog/tauri-1-0.md b/src/content/docs/blog/tauri-1-0.md
index 1dcb71ce94..faf3da7f70 100644
--- a/src/content/docs/blog/tauri-1-0.md
+++ b/src/content/docs/blog/tauri-1-0.md
@@ -3,10 +3,6 @@ title: Tauri 1.0 Release
date: 2022-06-19
authors: [nothingismagick]
excerpt: After 9 months of betas and 4 months of release candidates, Tauri version 1.0 is now available!
-banner:
- content: |
- You're reading the blog on the prerelease site for Tauri 2.0 -
- Go to the Tauri 1.0 site
---

@@ -64,17 +60,17 @@ To illustrate this, we compiled some numbers on the ecological impact of your ap
-| App Size | Unit Time (100Mb/s) | Downloads | Transit | Total Time (100Mb/s) | Electricity Use (kWh) | CO2 Produced (Ton) | Trees Needed 🌳 |
-| -------- | ------------------- | ---------- | ------- | -------------------- | --------------------- | ------------------ | --------------- |
-| 3 MB | 240 milliseconds | 1,000 | 3 GB | 24 minutes | 0.3 | 0.18 | 1 |
-| 3 MB | 240 milliseconds | 100,000 | 300 GB | 1.7 days | 30 | 18 | 108 |
-| 3 MB | 240 milliseconds | 10,000,000 | 30 TB | 167 days | 3,000 | 1,800 | 10,800 |
-| 200 MB | 16 seconds | 1,000 | 200 GB | 4.45 hours | 20 | 12 | 72 |
-| 200 MB | 16 seconds | 100,000 | 20 TB | 18.5 days | 2,000 | 1,200 | 7,200 |
-| 200 MB | 16 seconds | 10,000,000 | 2 PB | 5 years | 200,000 | 120,000 | 720,000 |
-| 600 MB | 48 seconds | 1,000 | 0.6 TB | 13 hours | 60 | 36 | 216 |
-| 600 MB | 48 seconds | 100,000 | 60 TB | 54.2 days | 6,000 | 3,600 | 21,600 |
-| 600 MB | 48 seconds | 10,000,000 | 6 PB | 14.8 years | 600,000 | 360,000 | 2,160,000 |
+| App Size | Unit Time (100Mb/s) | Downloads | Transit | Total Time (100Mb/s) | Electricity Use (kWh) | CO2 Produced (kg) | Trees Needed 🌳 |
+| -------- | ------------------- | ---------- | ------- | -------------------- | --------------------- | ----------------- | --------------- |
+| 3 MB | 240 milliseconds | 1,000 | 3 GB | 24 minutes | 0.3 | 0.18 | 1 |
+| 3 MB | 240 milliseconds | 100,000 | 300 GB | 1.7 days | 30 | 18 | 1 |
+| 3 MB | 240 milliseconds | 10,000,000 | 30 TB | 167 days | 3,000 | 1,800 | 11 |
+| 200 MB | 16 seconds | 1,000 | 200 GB | 4.45 hours | 20 | 12 | 1 |
+| 200 MB | 16 seconds | 100,000 | 20 TB | 18.5 days | 2,000 | 1,200 | 7 |
+| 200 MB | 16 seconds | 10,000,000 | 2 PB | 5 years | 200,000 | 120,000 | 720 |
+| 600 MB | 48 seconds | 1,000 | 0.6 TB | 13 hours | 60 | 36 | 1 |
+| 600 MB | 48 seconds | 100,000 | 60 TB | 54.2 days | 6,000 | 3,600 | 22 |
+| 600 MB | 48 seconds | 10,000,000 | 6 PB | 14.8 years | 600,000 | 360,000 | 2,160 |
diff --git a/src/content/docs/blog/tauri-2-0-0-alpha-3.md b/src/content/docs/blog/tauri-2-0-0-alpha-3.md
index 59417df90a..70b51749a1 100644
--- a/src/content/docs/blog/tauri-2-0-0-alpha-3.md
+++ b/src/content/docs/blog/tauri-2-0-0-alpha-3.md
@@ -3,10 +3,6 @@ title: Migration to webkit2gtk-4.1 on Linux port
date: 2023-02-03
authors: [wusyong]
excerpt: New v2.0 alpha released and new backend for Linux port
-banner:
- content: |
- You're reading the blog on the prerelease site for Tauri 2.0 -
- Go to the Tauri 1.0 site
---
Hello everybody! We just released [Tauri v2.0.0-alpha3](https://github.com/tauri-apps/tauri/releases/tag/tauri-v2.0.0-alpha.3) recently. While it doesn't bring any major feature, it does bring some huge impacts on Linux port.
diff --git a/src/content/docs/blog/tauri-2-0-0-beta.md b/src/content/docs/blog/tauri-2-0-0-beta.md
index 0249a3adb6..9c36f7d246 100644
--- a/src/content/docs/blog/tauri-2-0-0-beta.md
+++ b/src/content/docs/blog/tauri-2-0-0-beta.md
@@ -3,10 +3,6 @@ title: Announcing the Tauri v2 Beta Release
date: 2024-02-02
authors: [lucasfernog]
excerpt: Tauri v2 is ready to take the next step towards being stable! 2.0.0-beta.0 has been published.
-banner:
- content: |
- You're reading the blog on the prerelease site for Tauri 2.0 -
- Go to the Tauri 1.0 site
---

diff --git a/src/content/docs/blog/tauri-board-elections-2024.md b/src/content/docs/blog/tauri-board-elections-2024.md
index 79c25a228f..e842c01898 100644
--- a/src/content/docs/blog/tauri-board-elections-2024.md
+++ b/src/content/docs/blog/tauri-board-elections-2024.md
@@ -2,11 +2,7 @@
title: Tauri Board Elections 2024
date: 2024-06-28
authors: [jbolda]
-excerpt: The Tauri Programme is celebrating it's third anniversary of Tauri becoming a programme within The Commons Conservancy. We are hard at work bringing v2 to a stable release, and now the next round of Tauri Board Director elections is upon us!
-banner:
- content: |
- You're reading the blog on the prerelease site for Tauri 2.0 -
- Go to the Tauri 1.0 site
+excerpt: The Tauri Programme is celebrating its third anniversary of Tauri becoming a programme within The Commons Conservancy. We are hard at work bringing v2 to a stable release, and now the next round of Tauri Board Director elections is upon us!
---
The Tauri Programme is celebrating its third anniversary of Tauri becoming a programme within [The Commons Conservancy](https://commonsconservancy.org/). We are hard at work bringing v2 to a stable release, and now the next round of Tauri Board Director elections is upon us! Want to [get involved in other ways](#interested-in-getting-involved) and help Tauri towards v2? We would love your contributions especially to help evolve the documentation!
diff --git a/src/content/docs/blog/tauri-board-elections-2025.md b/src/content/docs/blog/tauri-board-elections-2025.md
new file mode 100644
index 0000000000..7018bd00d8
--- /dev/null
+++ b/src/content/docs/blog/tauri-board-elections-2025.md
@@ -0,0 +1,38 @@
+---
+title: Tauri Board Elections 2025
+date: 2025-06-30
+authors: [beanow]
+excerpt: As we continue to be amazed with all the applications you've created with Tauri v2, it's been 4 years that Tauri has become a Programme within The Commons Conservancy! This means we're preparing for a new round of Tauri Board Director elections for the next term.
+---
+
+As we continue to be amazed by all the applications you've created with Tauri v2, it's been 4 years since Tauri has become a Programme within [The Commons Conservancy](https://commonsconservancy.org/)! This means we're preparing for a new round of Tauri Board Director elections for the next term.
+
+## Board Elections
+
+The Tauri Board of Directors is the central decision-making body for the Tauri Programme and is responsible for its overall health and stability. Additional details can be found at the [Tauri Governance page](/about/governance/).
+
+In order to provide continuity from one year to another, the elections of seats are staggered over the course of 2 years. This means that one year a portion of the seats are elected, and the following year the remaining seats are elected. A Tauri Director seat is an elected position with a term of 2 years. The Board has a minimum of 3 Directors and a maximum of 7.
+
+This year there are 5 seats open for election.
+
+### Applying for Candidacy
+
+There are 3 steps to express interest and apply for candidacy:
+
+1. Learn about the role of a Tauri Board Director on the [Governance page](/about/governance/#tauri-board--board-directors).
+2. Prepare a written introduction about yourself that covers who you are, your history and relevance to Tauri, and what you would like to bring to the Board. (Examples from previous years can be found at https://github.com/tauri-apps/governance-and-guidance).
+3. **Apply prior to July 7th, 2025** by emailing [board@tauri.app](mailto:board@tauri.app) or messaging the `@board` role on the [Tauri Discord](https://discord.com/invite/tauri).
+
+Voting will take place starting on July 7th through July 14th, 2025 where Tauri Working Group Members will cast their votes. We're expecting to announce the results on or before July 19, 2025. If elected, we'll ask you to sign [this pledge](https://dracc.commonsconservancy.org/0016/) if you haven't done so previously.
+
+If you have any questions or would like more information please reach out by emailing [board@tauri.app](mailto:board@tauri.app), messaging the `@board` role on the [Tauri Discord](https://discord.com/invite/tauri).
+
+## Interested In Getting Involved?
+
+If joining the Board isn't for you but still want to help, here are some ways to do so! (Thank you ❤️)
+
+Reach out on our [Discord](https://discord.com/invite/tauri) by enabling the roles you're interested in like "Contribute to Tauri Code" or "Contribute to Documentation". This reveals the Contributors channels where you can chat with other contributors. While you're there, consider enabling Discord notification roles to stay apprised of news and questions from the team.
+
+Or on GitHub maybe you can help with these [good first issues](https://github.com/search?q=user%3Atauri-apps+label%3A"good+first+issue"+state%3Aopen&type=Issues&s=created&o=desc)?
+
+Additionally we're very grateful to all the teams and individuals who [sponsor us on GitHub](https://github.com/sponsors/tauri-apps) or [open collective](https://opencollective.com/tauri)!
diff --git a/src/content/docs/blog/tauri-board-elections-and-governance-updates.md b/src/content/docs/blog/tauri-board-elections-and-governance-updates.md
index 0b2b3a45e2..985cea2ad8 100644
--- a/src/content/docs/blog/tauri-board-elections-and-governance-updates.md
+++ b/src/content/docs/blog/tauri-board-elections-and-governance-updates.md
@@ -3,10 +3,6 @@ title: Tauri Board Elections & Governance Update
date: 2023-06-15
authors: [beanow, jbolda, lorenzolewis]
excerpt: The Tauri Programme is celebrating it's two year anniversary of Tauri becoming a programme within The Commons Conservancy as well as the one year milestone of the Tauri 1.0 release. This also means we're preparing for the next round of Tauri Board Director elections to welcome in the next chapter of Tauri.
-banner:
- content: |
- You're reading the blog on the prerelease site for Tauri 2.0 -
- Go to the Tauri 1.0 site
---
The Tauri Programme is celebrating it's two year anniversary of Tauri becoming a programme within [The Commons Conservancy](https://commonsconservancy.org/) as well as the one year milestone of the [Tauri 1.0 release](/blog/tauri-1-0/). This also means we're preparing for the next round of Tauri Board Director elections to welcome in the next chapter of Tauri.
diff --git a/src/content/docs/blog/tauri-community-growth-and-feedback.md b/src/content/docs/blog/tauri-community-growth-and-feedback.md
index 7ac95876a3..da6462d21e 100644
--- a/src/content/docs/blog/tauri-community-growth-and-feedback.md
+++ b/src/content/docs/blog/tauri-community-growth-and-feedback.md
@@ -4,10 +4,6 @@ date: 2023-02-09
authors: [lorenzolewis, amrbashir]
excerpt: Tauri Community Survey results and search improvements
image: ./tauri_community_growth_and_feedback/header.jpg
-banner:
- content: |
- You're reading the blog on the prerelease site for Tauri 2.0 -
- Go to the Tauri 1.0 site
---

diff --git a/src/content/docs/blog/tauri-egui-0-1.md b/src/content/docs/blog/tauri-egui-0-1.md
index 568c2d79c1..d6c12aca9a 100644
--- a/src/content/docs/blog/tauri-egui-0-1.md
+++ b/src/content/docs/blog/tauri-egui-0-1.md
@@ -3,10 +3,6 @@ title: Announcing tauri-egui 0.1.0
date: 2022-09-19
authors: [lucasfernog]
excerpt: The Tauri team is happy to announce the tauri-egui 0.1.0 release.
-banner:
- content: |
- You're reading the blog on the prerelease site for Tauri 2.0 -
- Go to the Tauri 1.0 site
---
The Tauri team is pleased to announce the first release of [tauri-egui](https://github.com/tauri-apps/tauri-egui).
diff --git a/src/content/docs/blog/tauri-verso-integration.md b/src/content/docs/blog/tauri-verso-integration.md
new file mode 100644
index 0000000000..423491caf8
--- /dev/null
+++ b/src/content/docs/blog/tauri-verso-integration.md
@@ -0,0 +1,111 @@
+---
+title: Experimental Tauri Verso Integration
+date: 2025-03-17
+authors: [tony]
+excerpt: The first look of the integration with Verso, a browser based on Servo
+---
+
+## What is Verso?
+
+So first off, what is `Verso`? [`Verso`](https://github.com/versotile-org/verso) is a browser based on [`Servo`](https://servo.org/), a web browser rendering engine written in Rust
+
+## Why using Verso instead of Servo directly?
+
+I believe there're quite a lot of people having thought about using Servo but got intimidated by the complex APIs and just gave up, which frankly I was one of them, so the goal of building the Verso webview is to make it easy enough to understand and use so that people will actually start to experiment and use it
+
+Servo itself is made to be relatively easy to embed compared to other browsers, but the APIs are still way too low level and it's quite daunting to use, you can take a look at the minimal example for running Servo with Winit at (note this is not even a fully functional example): https://github.com/servo/servo/blob/8d39d7706aee50971e848a5e31fc6bfd7ef552c1/components/servo/examples/winit_minimal.rs
+
+And compared to that, Verso's API looks like this, which is much easier and ergonomic to use
+
+```rust
+use std::env::current_exe;
+use std::thread::sleep;
+use std::time::Duration;
+use url::Url;
+use verso::VersoBuilder;
+
+fn main() {
+ let versoview_path = current_exe().unwrap().parent().unwrap().join("versoview");
+ let controller = VersoBuilder::new()
+ .with_panel(true)
+ .maximized(true)
+ .build(versoview_path, Url::parse("https://example.com").unwrap());
+ loop {
+ sleep(Duration::MAX);
+ }
+}
+```
+
+> https://github.com/versotile-org/verso/blob/2e853d4f3f4cb88274daa211b7a2eb3bd1517115/verso/src/main.rs
+
+It's not to say Servo's API is bad though, as they need to support a lot more use cases while we just need it for building applications with Tauri
+
+## `tauri-runtime-verso`
+
+So let's talk about the integration with Tauri!
+
+We choose to integrate Verso and Tauri through a new custom runtime [`tauri-runtime-verso`](https://github.com/versotile-org/tauri-runtime-verso) for this time, this is similar to our default runtime `tauri-runtime-wry`.
+
+With this approach, you can easily swap out the runtime and use Tauri like what you'll normally do:
+
+```rust
+use tauri_runtime_verso::{
+ INVOKE_SYSTEM_SCRIPTS, VersoRuntime, set_verso_path, set_verso_resource_directory,
+};
+
+fn main() {
+ // You need to set this to the path of the versoview executable
+ // before creating any of the webview windows
+ set_verso_path("../verso/target/debug/versoview");
+ // Set this to verso/servo's resources directory before creating any of the webview windows
+ // this is optional but recommended, this directory will include very important things
+ // like user agent stylesheet
+ set_verso_resource_directory("../verso/resources");
+ tauri::Builder::::new()
+ // Make sure to do this or some of the commands will not work
+ .invoke_system(INVOKE_SYSTEM_SCRIPTS.to_owned())
+ .run(tauri::generate_context!())
+ .unwrap();
+}
+```
+
+Just note that it's not as feature rich and powerful as the current backends used by Tauri in production yet, but it still has a lot to it, and we have built an example show casing it at https://github.com/versotile-org/tauri-runtime-verso/tree/main/examples/api
+
+
+
+#### Features you can see from the video:
+
+- We have all the functions the `tauri-cli` provides
+- We're using a modern framework, in this case [`React`](https://react.dev/)
+- We have our official log and opener plugins, they work exactly the same as if you're using Tauri with the other backends
+- Windowing functions work, including size, position, maximize, minimize, close, ...
+- [`Vite`](https://vitejs.dev/)'s css hot reload works as well
+- The `data-tauri-drag-region` attribute works
+
+## Future works
+
+Right now, Verso and `tauri-runtime-verso` are still in active development so we'll need to see as we go, but we do have something planned to do next
+
+### Pre-built Verso executable
+
+Releasing an easy to use pre-built Verso executable to help people get started with it quicker and easier, as currently you need to compile Verso yourself to get started
+
+Also if possible, as a long term goal, we would like an evergreen shared Verso, similar to WebView2 on Windows which you would place it on the system and it would update itself automatically, and shared between multiple apps so you don't have to ship the browser inside your app to reduce the bundle size significantly
+
+### More windowing and webview features support
+
+We currently only support a small subset of features in Tauri, and we would like to expand this to include more things, and we have currently planned to support window decorations, window titles and transparency
+
+### Initialization script without temporary files
+
+Currently Servo can only take an userscript directory to run on document start which is ok but for the Tauri's use case, we would like to do this programmatically without the help of files, as that could result in left over temporary files that we never clean up
+
+We have a [PR](https://github.com/servo/servo/pull/35388) merged in Servo just a few days ago and we should just need to use in Verso and then the `tarui-runtime-verso` so this is a coming soon!
+
+### Customization unique to the Verso runtime
+
+Tauri is largely made with the assumption of the underlying webview libraries, so there're very little ways to use many Verso specific futures right now, for example, setting the verso executable path and resources directory are being done through global variables, which is not really applicable to window specific features (for example setting rounded corners), so we would like to add support for that next
+
+## Thank you
+
+At the end we want to thank [NLNet](https://nlnet.nl/) for making this project possible by supporting it financially through grants!
diff --git a/src/content/docs/concept/Inter-Process Communication/brownfield.md b/src/content/docs/concept/Inter-Process Communication/brownfield.md
index 43ca055259..8917470161 100644
--- a/src/content/docs/concept/Inter-Process Communication/brownfield.md
+++ b/src/content/docs/concept/Inter-Process Communication/brownfield.md
@@ -1,5 +1,6 @@
---
title: Brownfield Pattern
+i18nReady: true
---
_**This is the default pattern.**_
@@ -15,13 +16,15 @@ legacy systems.
## Configuration
Because the Brownfield pattern is the default pattern, it doesn't require a configuration option to be set. To explicitly set
-it, you can use the `tauri > pattern` object in the `tauri.conf.json` configuration file.
+it, you can use the `app > security > pattern` object in the `tauri.conf.json` configuration file.
```json
{
- "tauri": {
- "pattern": {
- "use": "brownfield"
+ "app": {
+ "security": {
+ "pattern": {
+ "use": "brownfield"
+ }
}
}
}
diff --git a/src/content/docs/concept/Inter-Process Communication/index.mdx b/src/content/docs/concept/Inter-Process Communication/index.mdx
index d8255f5c07..3117111cdf 100644
--- a/src/content/docs/concept/Inter-Process Communication/index.mdx
+++ b/src/content/docs/concept/Inter-Process Communication/index.mdx
@@ -3,13 +3,14 @@ title: Inter-Process Communication
sidebar:
label: Overview
order: 1
+i18nReady: true
---
import { CardGrid, LinkCard } from '@astrojs/starlight/components';
Inter-Process Communication (IPC) allows isolated processes to communicate securely and is key to building more complex applications.
-Learn more above the specific IPC patterns in the following guides:
+Learn more about the specific IPC patterns in the following guides:
+
```toml
# src-tauri/Cargo.toml
[profile.dev]
@@ -27,11 +29,12 @@ lto = true # Enables link-time-optimizations.
opt-level = "s" # Prioritizes small binary size. Use `3` if you prefer speed.
panic = "abort" # Higher performance by disabling panic handlers.
strip = true # Ensures debug symbols are removed.
+```
-````
+
```toml
# src-tauri/Cargo.toml
[profile.dev]
@@ -46,7 +49,7 @@ panic = "abort" # Higher performance by disabling panic handlers.
strip = true # Ensures debug symbols are removed.
trim-paths = "all" # Removes potentially privileged information from your binaries.
rustflags = ["-Cdebuginfo=0", "-Zthreads=8"] # Better compile performance.
-````
+```
@@ -68,3 +71,43 @@ This is not a complete reference over all available options, merely the ones tha
- [rustflags:](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-rustflags-option) Sets Rust compiler flags on a profile by profile basis.
- `-Cdebuginfo=0`: Whether debuginfo symbols should be included in the build.
- `-Zthreads=8`: Increases the number of threads used during compilation.
+
+## Remove Unused Commands
+
+In Pull Request [`feat: add a new option to remove unused commands`](https://github.com/tauri-apps/tauri/pull/12890), we added in a new option in the tauri config file
+
+```json title=tauri.conf.json
+{
+ "build": {
+ "removeUnusedCommands": true
+ }
+}
+```
+
+to remove commands that're never allowed in your capability files (ACL), so you don't have to pay for what you don't use
+
+:::tip
+To maximize the benefit of this, only include commands that you use in the ACL instead of using `defaults`s
+:::
+
+:::note
+This feature requires `tauri@2.4`, `tauri-build@2.1`, `tauri-plugin@2.1` and `tauri-cli@2.4`
+:::
+
+:::note
+This won't be accounting for dynamically added ACLs at runtime so make sure to check it when using this
+:::
+
+
+How does it work under the hood?
+
+`tauri-cli` will communicate with `tauri-build` and the build script of `tauri`, `tauri-plugin` through an environment variable
+and let them generate a list of allowed commands from the ACL,
+this will then be used by the `generate_handler` macro to remove unused commands based on that
+
+An internal detail is this environment variable is currently `REMOVE_UNUSED_COMMANDS`,
+and it's set to project's directory, usually the `src-tauri` directory, this is used for the build scripts to find the capability files,
+and although it's not encouraged, you can still set this environment variable yourself if you can't or don't want to use `tauri-cli` to get this to work
+(**do note that as this is an implementation detail, we don't guarantee the stability of it**)
+
+
diff --git a/src/content/docs/contribute/index.mdx b/src/content/docs/contribute/index.mdx
new file mode 100644
index 0000000000..e7df35601b
--- /dev/null
+++ b/src/content/docs/contribute/index.mdx
@@ -0,0 +1,24 @@
+---
+title: Contribute
+topic: guides # this sidebar is active when viewing this page
+description: Guide for Tauri contributors
+sidebar:
+ order: 0
+ label: Overview
+ badge:
+ text: New
+ variant: tip
+---
+
+We, the maintainers, are really excited that you are interested in contributing to Tauri. We welcome contributors of any skill level and are happy to provide guidance on PRs.
+In case of any doubts you can reach out to us on [our Discord server](https://discord.gg/SpmNs4S).
+
+### Project repositories
+
+Main Tauri repositories you can contribute to are:
+
+- The [core Tauri](https://github.com/tauri-apps/tauri/) repository containing the Tauri runtime, build tools, macros and utils.
+- [Plugins workspace](https://github.com/tauri-apps/plugins-workspace) repository with all the official Tauri plugins
+- [Tauri Docs](https://github.com/tauri-apps/tauri-docs) repository containing this website
+
+Each of those Tauri repositories contains a `.github/CONTRIBUTING.md` file. In it you will find instructions on how to set up local development environment and submit a Pull Request.
diff --git a/src/content/docs/develop/Debug/crabnebula-devtools.mdx b/src/content/docs/develop/Debug/crabnebula-devtools.mdx
index d44f56ce9e..1e6472d1cd 100644
--- a/src/content/docs/develop/Debug/crabnebula-devtools.mdx
+++ b/src/content/docs/develop/Debug/crabnebula-devtools.mdx
@@ -4,8 +4,12 @@ sidebar:
badge:
text: New
variant: tip
+i18nReady: true
---
+import { Image } from 'astro:assets';
+import devToolsPrint from '@assets/develop/Debug/crabnebula-devtools.png';
+
[CrabNebula](https://crabnebula.dev/) provides a free [DevTools](https://crabnebula.dev/devtools/) application for Tauri as part of its partnership with the Tauri project. This application allows you to instrument your Tauri app by capturing its embedded assets, Tauri configuration file, logs and spans and providing a web frontend to seamlessly visualize data in real time.
With the CrabNebula DevTools you can inspect your app's log events (including logs from dependencies), track down the performance of your command calls and overall Tauri API usage, with a special interface for Tauri events and commands, including payload, responses and inner logs and execution spans.
@@ -20,19 +24,27 @@ And initialize the plugin as soon as possible in your main function:
```rust
fn main() {
- #[cfg(debug_assertions)]
- let devtools = tauri_plugin_devtools::init(); // initialize the plugin as early as possible
+ // This should be called as early in the execution of the app as possible
+ #[cfg(debug_assertions)] // only enable instrumentation in development builds
+ let devtools = tauri_plugin_devtools::init();
let mut builder = tauri::Builder::default();
#[cfg(debug_assertions)]
- builder = builder.plugin(devtools); // then register it with Tauri
+ {
+ builder = builder.plugin(devtools);
+ }
- builder.run(tauri::generate_context!())
+ builder
+ .run(tauri::generate_context!())
.expect("error while running tauri application");
}
```
+And then run your app as usual, if everything is set up correctly devtools will print the following message:
+
+
+
:::note
In this case we only initialize the devtools plugin for debug applications, which is recommended.
:::
diff --git a/src/content/docs/develop/Debug/index.mdx b/src/content/docs/develop/Debug/index.mdx
index 2229b8bf3f..7ec146b159 100644
--- a/src/content/docs/develop/Debug/index.mdx
+++ b/src/content/docs/develop/Debug/index.mdx
@@ -12,7 +12,7 @@ With all the moving pieces in Tauri, you may run into a problem that requires de
## Development Only Code
-One of the most useful tools in your toolkit for debugging is the ability to add debugging statements in your code. However, you generally you don't want these to end up in production, which is where the ability to check whether you're running in development mode or not comes in handy.
+One of the most useful tools in your toolkit for debugging is the ability to add debugging statements in your code. However, you generally don't want these to end up in production, which is where the ability to check whether you're running in development mode or not comes in handy.
### In Rust
@@ -118,6 +118,7 @@ To create a debug build, run the `tauri build --debug` command.
yarn="yarn tauri build --debug"
pnpm="pnpm tauri build --debug"
deno="deno task tauri build --debug"
+ bun="bun tauri build --debug"
cargo="cargo tauri build --debug"
/>
diff --git a/src/content/docs/develop/Debug/neovim.mdx b/src/content/docs/develop/Debug/neovim.mdx
new file mode 100644
index 0000000000..9af65f9e4a
--- /dev/null
+++ b/src/content/docs/develop/Debug/neovim.mdx
@@ -0,0 +1,127 @@
+---
+title: Debug in Neovim
+i18nReady: true
+---
+
+There are many different plugins that can be used to debug Rust code in Neovim. This guide will show you how to set up `nvim-dap` and some additional plugins to debug Tauri application.
+
+### Prerequisites
+
+`nvim-dap` extension requires `codelldb` binary. Download the version for your system from https://github.com/vadimcn/codelldb/releases and unzip it. We will point to it later in the `nvim-dap` configuration.
+
+### Configuring nvim-dap
+
+Install [`nvim-dap`](https://github.com/mfussenegger/nvim-dap) and [`nvim-dap-ui`](https://github.com/rcarriga/nvim-dap-ui) plugins. Follow the instructions provided on their github pages or simply use your favourite plugin manager.
+Note that `nvim-dap-ui` requires `nvim-nio` plugin.
+
+Next, setup the plugin in your Neovim configuration:
+
+```lua title="init.lua"
+local dap = require("dap")
+
+dap.adapters.codelldb = {
+ type = 'server',
+ port = "${port}",
+ executable = {
+ -- Change this to your path!
+ command = '/opt/codelldb/adapter/codelldb',
+ args = {"--port", "${port}"},
+ }
+}
+
+dap.configurations.rust= {
+ {
+ name = "Launch file",
+ type = "codelldb",
+ request = "launch",
+ program = function()
+ return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/target/debug/', 'file')
+ end,
+ cwd = '${workspaceFolder}',
+ stopOnEntry = false
+ },
+}
+```
+
+This setup will ask you to point to the Tauri App binary you want to debug each time you lanuch the debugger.
+
+Optionally, you can setup `nvim-dap-ui` plugin to toggle debugger view automatically each time debugging session starts and stops:
+
+```lua title="init.lua"
+local dapui = require("dapui")
+dapui.setup()
+
+dap.listeners.before.attach.dapui_config = function()
+ dapui.open()
+end
+dap.listeners.before.launch.dapui_config = function()
+ dapui.open()
+end
+dap.listeners.before.event_terminated.dapui_config = function()
+ dapui.close()
+end
+dap.listeners.before.event_exited.dapui_config = function()
+ dapui.close()
+end
+
+```
+
+Lastly, you can change the default way the breakpoints are displayed in the editor:
+
+```lua title="init.lua"
+vim.fn.sign_define('DapBreakpoint',{ text ='🟥', texthl ='', linehl ='', numhl =''})
+vim.fn.sign_define('DapStopped',{ text ='▶️', texthl ='', linehl ='', numhl =''})
+```
+
+### Starting the dev server
+
+Since we're not using Tauri CLI to launch the app the development server will not start automatically. To control the state of development server from Neovim you can use the [overseer](https://github.com/stevearc/overseer.nvim/tree/master) plugin.
+
+Best way to control tasks running in background is to use [VS Code style task](https://github.com/stevearc/overseer.nvim/blob/master/doc/guides.md#vs-code-tasks) configuration. To do this create a `.vscode/tasks.json` file in the projects directory.
+
+You can find example task configuration for project using `trunk` below.
+
+```json title=".vscode/tasks.json"
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "type": "process",
+ "label": "dev server",
+ "command": "trunk",
+ "args": ["serve"],
+ "isBackground": true,
+ "presentation": {
+ "revealProblems": "onProblem"
+ },
+ "problemMatcher": {
+ "pattern": {
+ "regexp": "^error:.*",
+ "file": 1,
+ "line": 2
+ },
+ "background": {
+ "activeOnStart": false,
+ "beginsPattern": ".*Rebuilding.*",
+ "endsPattern": ".*server listening at:.*"
+ }
+ }
+ }
+ ]
+}
+```
+
+### Example key bindings
+
+Below you can find example key bindings to start and control debugging sessions.
+
+```lua title="init.lua"
+vim.keymap.set('n', '', function() dap.continue() end)
+vim.keymap.set('n', '', function() dap.disconnect({ terminateDebuggee = true }) end)
+vim.keymap.set('n', '', function() dap.step_over() end)
+vim.keymap.set('n', '', function() dap.step_into() end)
+vim.keymap.set('n', '', function() dap.step_out() end)
+vim.keymap.set('n', 'b', function() dap.toggle_breakpoint() end)
+vim.keymap.set('n', 'o', function() overseer.toggle() end)
+vim.keymap.set('n', 'R', function() overseer.run_template() end)
+```
diff --git a/src/content/docs/develop/Debug/vscode.mdx b/src/content/docs/develop/Debug/vscode.mdx
index 016bf42418..400f640f21 100644
--- a/src/content/docs/develop/Debug/vscode.mdx
+++ b/src/content/docs/develop/Debug/vscode.mdx
@@ -130,7 +130,10 @@ Here is an example of running a dev server (equivalent of `beforeDevCommand`) an
{
"label": "build:debug",
"type": "cargo",
- "command": "build"
+ "command": "build",
+ "options": {
+ "cwd": "${workspaceRoot}/src-tauri"
+ }
},
{
"label": "ui:dev",
diff --git a/src/content/docs/develop/Plugins/develop-mobile.mdx b/src/content/docs/develop/Plugins/develop-mobile.mdx
index 928b9161e5..86dd938824 100644
--- a/src/content/docs/develop/Plugins/develop-mobile.mdx
+++ b/src/content/docs/develop/Plugins/develop-mobile.mdx
@@ -216,6 +216,20 @@ class ExamplePlugin(private val activity: Activity): Plugin(activity) {
}
```
+:::note
+On Android native commands are scheduled on the main thread. Performing long-running operations will cause the UI to freeze and potentially "Application Not Responding" (ANR) error.
+
+If you need to wait for some blocking IO, you can launch a corouting like that:
+
+```kotlin
+CoroutineScope(Dispatchers.IO).launch {
+ val result = myLongRunningOperation()
+ invoke.resolve(result)
+}
+```
+
+:::
+
@@ -341,6 +355,129 @@ Use a nullable type and set the default value on the command function instead.
Required arguments are defined as `let : Type`
:::
+## Calling Rust From Mobile Plugins
+
+It is often preferable to write plugin code in Rust, for performance and reusability. While Tauri doesn't directly provide a mechanism to call Rust from your plugin code, using JNI on Android and FFI on iOS allows plugins to call shared code, even when the application WebView is suspended.
+
+### Android
+
+In your plugin's `Cargo.toml`, add the jni crate as a dependency:
+
+```toml
+[target.'cfg(target_os = "android")'.dependencies]
+jni = "0.21"
+```
+
+Load the application library statically and define native functions in your Kotlin code. In this example, the Kotlin class is `com.example.HelloWorld`, we need to reference the full package name from the Rust side.
+
+```kotlin
+private const val TAG = "MyPlugin"
+
+init {
+ try {
+ // Load the native library (libapp_lib.so)
+ // This is the shared library built by Cargo with crate-type = ["cdylib"]
+ System.loadLibrary("app_lib")
+ Log.d(TAG, "Successfully loaded libapp_lib.so")
+ } catch (e: UnsatisfiedLinkError) {
+ Log.e(TAG, "Failed to load libapp_lib.so", e)
+ throw e
+ }
+}
+
+external fun helloWorld(name: String): String?
+```
+
+Then in your plugin's Rust code, define the function JNI will look for. The function format is `Java_package_class_method`, so for our class above this becomes `Java_com_example_HelloWorld_helloWorld` to get called by our `helloWorld` method:
+
+```rust
+#[cfg(target_os = "android")]
+#[no_mangle]
+pub extern "system" fn Java_com_example_HelloWorld_helloWorld(
+ mut env: JNIEnv,
+ _class: JClass,
+ name: JString,
+) -> jstring {
+ log::debug!("Calling JNI Hello World!");
+ let result = format!("Hello, {}!", name);
+
+ match env.new_string(result) {
+ Ok(jstr) => jstr.into_raw(),
+ Err(e) => {
+ log::error!("Failed to create JString: {}", e);
+ std::ptr::null_mut()
+ }
+ }
+}
+```
+
+### iOS
+
+iOS only uses standard C FFI, so doesn't need any new dependencies. Add the hook in your Swift code, as well as any necessary cleanup. These functions can be named anything valid, but must be annotated with `@_silgen_name(FFI_FUNC)`, where FFI_FUNC is a function name to be called from Rust:
+
+```swift
+@_silgen_name("hello_world_ffi")
+private static func helloWorldFFI(_ name: UnsafePointer) -> UnsafeMutablePointer?
+
+@_silgen_name("free_hello_result_ffi")
+private static func freeHelloResult(_ result: UnsafeMutablePointer)
+
+static func helloWorld(name: String) -> String? {
+ // Call Rust FFI
+ let resultPtr = name.withCString({ helloWorldFFI($0) })
+
+ // Convert C string to Swift String
+ let result = String(cString: resultPtr)
+
+ // Free the C string
+ freeHelloResult(resultPtr)
+
+ return result
+}
+
+```
+
+Then, implement the Rust side. The `extern` functions here must match the `@_silgen_name` annotations on the Swift side:
+
+```rust
+#[no_mangle]
+pub unsafe extern "C" fn hello_world_ffi(c_name: *const c_char) -> *mut c_char {
+ let name = match CStr::from_ptr(c_name).to_str() {
+ Ok(s) => s,
+ Err(e) => {
+ log::error!("[iOS FFI] Failed to convert C string: {}", e);
+ return std::ptr::null_mut();
+ }
+ };
+
+ let result = format!("Hello, {}!", name);
+
+ match CString::new(result) {
+ Ok(c_str) => c_str.into_raw(),
+ Err(e) => {
+ log::error!("[iOS FFI] Failed to create C string: {}", e);
+ std::ptr::null_mut()
+ }
+ }
+}
+
+#[no_mangle]
+pub unsafe extern "C" fn free_hello_result_ffi(result: *mut c_char) {
+ if !result.is_null() {
+ drop(CString::from_raw(result));
+ }
+}
+```
+
+## Android 16KB Memory Pages
+
+Google is moving to make 16KB memory pages a requirement in all new Android app submissions. Building with an NDK version 28 or higher should automatically generate bundles that meet this requirement, but in the event an older NDK version must be used or generated files aren't 16KB aligned, the following can be added to `.cargo/config.toml` to flag this to `rustc`:
+
+```toml
+[target.aarch64-linux-android]
+rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384"]
+```
+
## Permissions
If a plugin requires permissions from the end user, Tauri simplifies the process of checking and requesting permissions.
diff --git a/src/content/docs/develop/Tests/WebDriver/Example/index.mdx b/src/content/docs/develop/Tests/WebDriver/Example/index.mdx
deleted file mode 100644
index 5b9135f245..0000000000
--- a/src/content/docs/develop/Tests/WebDriver/Example/index.mdx
+++ /dev/null
@@ -1,194 +0,0 @@
----
-title: Setup
-sidebar:
- order: 30
----
-
-{/* TODO: REVISE COPY TO V2 */}
-
-import { Image } from 'astro:assets';
-import HelloTauriWebdriver from '@assets/develop/Tests/hello-tauri-webdriver.png';
-
-This example application solely focuses on adding WebDriver testing to an already existing project. To have a
-project to test in the following two sections, we will set up an extremely minimal Tauri application for use in
-our testing. We will not use the Tauri CLI, any frontend dependencies or build steps, and not be bundling the
-application afterward. This is to showcase exactly a minimal suite to show off adding WebDriver testing to an existing
-application.
-
-If you just want to see the finished example project that utilizes what will be shown in this example guide, then you
-can see https://github.com/chippers/hello_tauri.
-
-## Initializing a Cargo Project
-
-We want to create a new binary Cargo project to house this example application. We can easily do this from the command
-line with `cargo new hello-tauri-webdriver --bin`, which will scaffold a minimal binary Cargo project for us. This
-directory will serve as the working directory for the rest of this guide, so make sure the commands you run are inside
-this new `hello-tauri-webdriver/` directory.
-
-## Creating a Minimal Frontend
-
-We will create a minimal HTML file to act as our example application's front end. We will also be using a few things
-from this frontend later during our WebDriver tests.
-
-First, let's create our Tauri `distDir` that we know we will need once building the Tauri portion of the application.
-`mkdir dist` should create a new directory called `dist/` in which we will be placing the following `index.html` file.
-
-`dist/index.html`:
-
-```html
-
-
-
-
- Hello Tauri!
-
-
-
-
Hello, Tauri!
-
-
-```
-
-## Adding Tauri to the Cargo Project
-
-Next, we will add the necessary items to turn our Cargo project into a Tauri project. First, is adding the dependencies
-to the Cargo Manifest (`Cargo.toml`) so that Cargo knows to pull in our dependencies while building.
-
-`Cargo.toml`:
-
-```toml
-[package]
-name = "hello-tauri-webdriver"
-version = "0.1.0"
-edition = "2021"
-rust-version = "1.56"
-
-# Needed to set up some things for Tauri at build time
-[build-dependencies]
-tauri-build = "1"
-
-# The actual Tauri dependency, along with `custom-protocol` to serve the pages.
-[dependencies]
-tauri = { version = "1", features = ["custom-protocol"] }
-
-# Make --release build a binary that is small (opt-level = "s") and fast (lto = true).
-# This is completely optional, but shows that testing the application as close to the
-# typical release settings is possible. Note: this will slow down compilation.
-[profile.release]
-incremental = false
-codegen-units = 1
-panic = "abort"
-opt-level = "s"
-lto = true
-```
-
-We added a `[build-dependency]` as you may have noticed. To use the build dependency, we must use it from a build
-script. We will create one now at `build.rs`.
-
-`build.rs`:
-
-```rust
-fn main() {
- // Only watch the `dist/` directory for recompiling, preventing unnecessary
- // changes when we change files in other project subdirectories.
- println!("cargo:rerun-if-changed=dist");
-
- // Run the Tauri build-time helpers
- tauri_build::build()
-}
-```
-
-Our Cargo Project now knows how to pull in and build our Tauri dependencies with all that setup. Let's finish making
-this minimal example a Tauri application by setting up Tauri in the actual project code. We will be editing
-the `src/main.rs`
-file to add this Tauri functionality.
-
-`src/main.rs`:
-
-```rust
-fn main() {
- tauri::Builder::default()
- .run(tauri::generate_context!())
- .expect("unable to run Tauri application");
-}
-```
-
-Pretty simple, right?
-
-## Tauri Configuration
-
-We are going to need 2 things to successfully build the application. First, we need an icon file. You can use any PNG
-for this next part and copy it into `icon.png`. Typically, this will be provided as part of the scaffolding when you use
-the Tauri CLI to create a project. To get the default Tauri icon, we can download the icon used by the Hello Tauri
-example repository with the
-command `curl -L "https://github.com/chippers/hello_tauri/raw/main/icon.png" --output icon.png`.
-
-We will need a `tauri.conf.json` to set some important configuration values for Tauri. Again,
-this would typically come from the `tauri init` scaffolding command, but we will be creating our own minimal config
-here.
-
-`tauri.conf.json`:
-
-```json
-{
- "build": {
- "distDir": "dist"
- },
- "tauri": {
- "bundle": {
- "identifier": "studio.tauri.hello_tauri_webdriver",
- "icon": ["icon.png"]
- },
- "allowlist": {
- "all": false
- },
- "windows": [
- {
- "width": 800,
- "height": 600,
- "resizable": true,
- "fullscreen": false
- }
- ]
- }
-}
-```
-
-I'll go over some of these. You can see the `dist/` directory we created earlier specified as the `distDir` property. We
-set a bundle identifier so that the built application has a unique id and set the `icon.png` as the only
-icon. We aren't using any Tauri APIs or features, so we disable them in `allowlist` by setting `"all": false`.
-The window values just set a single window to be created with some reasonable default values.
-
-At this point, we have a basic Hello World application that should display a simple greeting when run.
-
-## Running the Example Application
-
-To make sure we did it right, let's build this application! We will run this as a `--release` application because we
-will also run our WebDriver tests with a release profile. Run `cargo run --release`, and after some compiling, we should
-see the following application pop up.
-
-
-
-
-
-_Note: If you are modifying the application and want to use the Devtools, then run it without `--release` and "Inspect
-Element" should be available in the right-click menu._
-
-We should now be ready to start testing this application with some WebDriver frameworks. This guide will go over both
-[WebdriverIO](/develop/tests/webdriver/example/webdriverio/) and [Selenium](/develop/tests/webdriver/example/selenium/) in that order.
diff --git a/src/content/docs/develop/Tests/WebDriver/Example/selenium.mdx b/src/content/docs/develop/Tests/WebDriver/Example/selenium.mdx
index 6e69a803b4..a93aed4c94 100644
--- a/src/content/docs/develop/Tests/WebDriver/Example/selenium.mdx
+++ b/src/content/docs/develop/Tests/WebDriver/Example/selenium.mdx
@@ -2,28 +2,26 @@
title: Selenium
sidebar:
order: 31
+i18nReady: true
---
-{/* TODO: REVISE COPY TO V2 */}
-
import CommandTabs from '@components/CommandTabs.astro';
-:::note[Example Application]
+:::note
-This [Selenium] guide expects you to have already gone through the [example Application setup] to follow
-step-by-step. The general information may still be helpful otherwise.
+Make sure to go through the [prerequisites instructions] to be able to follow this guide.
:::
This WebDriver testing example will use [Selenium] and a popular Node.js testing suite. You are expected to already have
-Node.js installed, along with `npm` or `yarn` although the [finished example project] uses `yarn`.
+Node.js installed, along with `npm` or `yarn` although the [finished example project] uses `pnpm`.
## Create a Directory for the Tests
Let's create a space to write these tests in our project. We will be using a nested directory for
this example project as we will later also go over other frameworks, but typically you will only need to use one. Create
-the directory we will use with `mkdir -p webdriver/selenium`. The rest of this guide will assume you are inside the
-`webdriver/selenium` directory.
+the directory we will use with `mkdir -p e2e-tests`. The rest of this guide will assume you are inside the
+`e2e-tests` directory.
## Initializing a Selenium Project
@@ -38,13 +36,14 @@ guide on how to set it up from scratch.
"name": "selenium",
"version": "1.0.0",
"private": true,
+ "type": "module",
"scripts": {
"test": "mocha"
},
"dependencies": {
- "chai": "^4.3.4",
- "mocha": "^9.0.3",
- "selenium-webdriver": "^4.0.0-beta.4"
+ "chai": "^5.2.1",
+ "mocha": "^11.7.1",
+ "selenium-webdriver": "^4.34.0"
}
}
```
@@ -80,21 +79,24 @@ testing file at `test/test.js` by default, so let's create that file now.
`test/test.js`:
```javascript
-const os = require('os');
-const path = require('path');
-const { expect } = require('chai');
-const { spawn, spawnSync } = require('child_process');
-const { Builder, By, Capabilities } = require('selenium-webdriver');
+import os from 'os';
+import path from 'path';
+import { expect } from 'chai';
+import { spawn, spawnSync } from 'child_process';
+import { Builder, By, Capabilities } from 'selenium-webdriver';
+import { fileURLToPath } from 'url';
+
+const __dirname = fileURLToPath(new URL('.', import.meta.url));
// create the path to the expected application binary
const application = path.resolve(
__dirname,
'..',
'..',
- '..',
+ 'src-tauri',
'target',
- 'release',
- 'hello-tauri-webdriver'
+ 'debug',
+ 'tauri-app'
);
// keep track of the webdriver instance we create
@@ -102,13 +104,18 @@ let driver;
// keep track of the tauri-driver process we start
let tauriDriver;
+let exit = false;
before(async function () {
// set timeout to 2 minutes to allow the program to build if it needs to
this.timeout(120000);
- // ensure the program has been built
- spawnSync('cargo', ['build', '--release']);
+ // ensure the app has been built
+ spawnSync('yarn', ['tauri', 'build', '--debug', '--no-bundle'], {
+ cwd: path.resolve(__dirname, '../..'),
+ stdio: 'inherit',
+ shell: true,
+ });
// start tauri-driver
tauriDriver = spawn(
@@ -116,6 +123,16 @@ before(async function () {
[],
{ stdio: [null, process.stdout, process.stderr] }
);
+ tauriDriver.on('error', (error) => {
+ console.error('tauri-driver error:', error);
+ process.exit(1);
+ });
+ tauriDriver.on('exit', (code) => {
+ if (!exit) {
+ console.error('tauri-driver exited with code:', code);
+ process.exit(1);
+ }
+ });
const capabilities = new Capabilities();
capabilities.set('tauri:options', { application });
@@ -130,10 +147,7 @@ before(async function () {
after(async function () {
// stop the webdriver session
- await driver.quit();
-
- // kill the tauri-driver process
- tauriDriver.kill();
+ await closeTauriDriver();
});
describe('Hello Tauri', () => {
@@ -160,6 +174,34 @@ describe('Hello Tauri', () => {
expect(luma).to.be.lessThan(100);
});
});
+
+async function closeTauriDriver() {
+ exit = true;
+ // kill the tauri-driver process
+ tauriDriver.kill();
+ // stop the webdriver session
+ await driver.quit();
+}
+
+function onShutdown(fn) {
+ const cleanup = () => {
+ try {
+ fn();
+ } finally {
+ process.exit();
+ }
+ };
+
+ process.on('exit', cleanup);
+ process.on('SIGINT', cleanup);
+ process.on('SIGTERM', cleanup);
+ process.on('SIGHUP', cleanup);
+ process.on('SIGBREAK', cleanup);
+}
+
+onShutdown(() => {
+ closeTauriDriver();
+});
```
If you are familiar with JS testing frameworks, `describe`, `it`, and `expect` should look familiar. We also have
@@ -199,9 +241,9 @@ tests!
With [Selenium] and some hooking up to a test suite, we just enabled e2e testing without modifying our Tauri
application at all!
-[example application setup]: /develop/tests/webdriver/example/
+[prerequisites instructions]: /develop/tests/webdriver/
[selenium]: https://selenium.dev/
-[finished example project]: https://github.com/chippers/hello_tauri
+[finished example project]: https://github.com/tauri-apps/webdriver-example
[mocha]: https://mochajs.org/
[chai]: https://www.chaijs.com/
[`selenium-webdriver`]: https://www.npmjs.com/package/selenium-webdriver
diff --git a/src/content/docs/develop/Tests/WebDriver/Example/webdriverio.mdx b/src/content/docs/develop/Tests/WebDriver/Example/webdriverio.mdx
index 94c03289c6..ca14f6b095 100644
--- a/src/content/docs/develop/Tests/WebDriver/Example/webdriverio.mdx
+++ b/src/content/docs/develop/Tests/WebDriver/Example/webdriverio.mdx
@@ -2,28 +2,26 @@
title: WebdriverIO
sidebar:
order: 31
+i18nReady: true
---
-{/* TODO: REVISE COPY TO V2 */}
-
import CommandTabs from '@components/CommandTabs.astro';
-:::note[Example Application]
+:::note
-This [WebdriverIO] guide expects you to have already gone through the [example Application setup] to follow
-step-by-step. The general information may still be helpful otherwise.
+Make sure to go through the [prerequisites instructions] to be able to follow this guide.
:::
This WebDriver testing example will use [WebdriverIO], and its testing suite. It is expected to have Node.js already
-installed, along with `npm` or `yarn` although the [finished example project] uses `yarn`.
+installed, along with `npm` or `yarn` although the [finished example project] uses `pnpm`.
## Create a Directory for the Tests
Let's create a space to write these tests in our project. We will be using a nested directory for
this example project as we will later also go over other frameworks, but typically you only need to use one. Create
-the directory we will use with `mkdir -p webdriver/webdriverio`. The rest of this guide assumes you are inside the
-`webdriver/webdriverio` directory.
+the directory we will use with `mkdir e2e-tests`. The rest of this guide assumes you are inside the
+`e2e-tests` directory.
## Initializing a WebdriverIO Project
@@ -38,16 +36,17 @@ guide on setting it up from scratch.
"name": "webdriverio",
"version": "1.0.0",
"private": true,
+ "type": "module",
"scripts": {
"test": "wdio run wdio.conf.js"
},
"dependencies": {
- "@wdio/cli": "^7.9.1"
+ "@wdio/cli": "^9.19.0"
},
"devDependencies": {
- "@wdio/local-runner": "^7.9.1",
- "@wdio/mocha-framework": "^7.9.1",
- "@wdio/spec-reporter": "^7.9.0"
+ "@wdio/local-runner": "^9.19.0,
+ "@wdio/mocha-framework": "^9.19.0",
+ "@wdio/spec-reporter": "^9.19.0"
}
}
```
@@ -80,21 +79,27 @@ config file which controls most aspects of our testing suite.
`wdio.conf.js`:
```javascript
-const os = require('os');
-const path = require('path');
-const { spawn, spawnSync } = require('child_process');
+import os from 'os';
+import path from 'path';
+import { spawn, spawnSync } from 'child_process';
+import { fileURLToPath } from 'url';
+
+const __dirname = fileURLToPath(new URL('.', import.meta.url));
// keep track of the `tauri-driver` child process
let tauriDriver;
+let exit = false;
-exports.config = {
+export const config = {
+ host: '127.0.0.1',
+ port: 4444,
specs: ['./develop/tests/specs/**/*.js'],
maxInstances: 1,
capabilities: [
{
maxInstances: 1,
'tauri:options': {
- application: '../../target/release/hello-tauri-webdriver',
+ application: '../src-tauri/target/debug/tauri-app',
},
},
],
@@ -106,24 +111,76 @@ exports.config = {
},
// ensure the rust project is built since we expect this binary to exist for the webdriver sessions
- onPrepare: () => spawnSync('cargo', ['build', '--release']),
+ onPrepare: () => {
+ // Remove the extra `--` if you're not using npm!
+ spawnSync(
+ 'npm',
+ ['run', 'tauri', 'build', '--', '--debug', '--no-bundle'],
+ {
+ cwd: path.resolve(__dirname, '..'),
+ stdio: 'inherit',
+ shell: true,
+ }
+ );
+ },
// ensure we are running `tauri-driver` before the session starts so that we can proxy the webdriver requests
- beforeSession: () =>
- (tauriDriver = spawn(
+ beforeSession: () => {
+ tauriDriver = spawn(
path.resolve(os.homedir(), '.cargo', 'bin', 'tauri-driver'),
[],
{ stdio: [null, process.stdout, process.stderr] }
- )),
+ );
+
+ tauriDriver.on('error', (error) => {
+ console.error('tauri-driver error:', error);
+ process.exit(1);
+ });
+ tauriDriver.on('exit', (code) => {
+ if (!exit) {
+ console.error('tauri-driver exited with code:', code);
+ process.exit(1);
+ }
+ });
+ },
// clean up the `tauri-driver` process we spawned at the start of the session
- afterSession: () => tauriDriver.kill(),
+ // note that afterSession might not run if the session fails to start, so we also run the cleanup on shutdown
+ afterSession: () => {
+ closeTauriDriver();
+ },
};
+
+function closeTauriDriver() {
+ exit = true;
+ tauriDriver?.kill();
+}
+
+function onShutdown(fn) {
+ const cleanup = () => {
+ try {
+ fn();
+ } finally {
+ process.exit();
+ }
+ };
+
+ process.on('exit', cleanup);
+ process.on('SIGINT', cleanup);
+ process.on('SIGTERM', cleanup);
+ process.on('SIGHUP', cleanup);
+ process.on('SIGBREAK', cleanup);
+}
+
+// ensure tauri-driver is closed when our test process exits
+onShutdown(() => {
+ closeTauriDriver();
+});
```
-If you are interested in the properties on the `exports.config` object, I [suggest reading the documentation][webdriver documentation].
+If you are interested in the properties on the `config` object, we [suggest reading the documentation][webdriver documentation].
For non-WDIO specific items, there are comments explaining why we are running commands in `onPrepare`, `beforeSession`,
-and `afterSession`. We also have our specs set to `"./develop/tests/specs/**/*.js"`, so let's create a spec now.
+and `afterSession`. We also have our specs set to `"./test/specs/**/*.js"`, so let's create a spec now.
## Spec
@@ -215,9 +272,9 @@ We see the Spec Reporter tell us that all 3 tests from the `test/specs/example.e
Using the [WebdriverIO] test suite, we just easily enabled e2e testing for our Tauri application from just a few lines
of configuration and a single command to run it! Even better, we didn't have to modify the application at all.
-[example application setup]: /develop/tests/webdriver/example/
+[prerequisites instructions]: /develop/tests/webdriver/
[webdriverio]: https://webdriver.io/
-[finished example project]: https://github.com/chippers/hello_tauri
+[finished example project]: https://github.com/tauri-apps/webdriver-example
[mocha]: https://mochajs.org/
[webdriver documentation]: https://webdriver.io/docs/configurationfile
[webdriverio api docs]: https://webdriver.io/docs/api
diff --git a/src/content/docs/develop/Tests/WebDriver/ci.md b/src/content/docs/develop/Tests/WebDriver/ci.md
index ea99a9da45..9390f75279 100644
--- a/src/content/docs/develop/Tests/WebDriver/ci.md
+++ b/src/content/docs/develop/Tests/WebDriver/ci.md
@@ -3,21 +3,23 @@ title: Continuous Integration
description: WebDriver Testing
sidebar:
order: 21
+i18nReady: true
---
-Utilizing Linux and some programs to create a fake display, it is possible to run [WebDriver] tests with
-[`tauri-driver`] on your CI. The following example uses the [WebdriverIO] example we [previously built together] and
+It is possible to run [WebDriver] tests with [`tauri-driver`] on your CI. The following example uses the [WebdriverIO] example we [previously built together] and
GitHub Actions.
-This means the following assumptions:
+The WebDriver tests are executed on Linux by creating a fake display.
+Some CI systems such as GitHub Actions also support running WebDriver tests on Windows.
-1. The Tauri application is in the repository root and the binary builds when running `cargo build --release`.
-2. The [WebDriverIO] test runner is in the `webdriver/webdriverio` directory and runs when `yarn test` is used in that
- directory.
+## GitHub Actions
-The following is a commented GitHub Actions workflow file at `.github/workflows/webdriver.yml`
+The following GitHub Actions assumes:
-```yaml
+1. The Tauri application is in the `src-tauri` folder.
+2. The [WebDriverIO] test runner is in the `e2e-tests` directory and runs when `yarn test` is used in that directory.
+
+```yaml title=".github/workflows/webdriver.yml"
# run this action when the repository is pushed to
on: [push]
@@ -30,8 +32,14 @@ jobs:
# the display name of the test job
name: WebDriverIO Test Runner
- # we want to run on the latest linux environment
- runs-on: ubuntu-22.04
+ # run on the matrix platform
+ runs-on: ${{ matrix.platform }}
+ strategy:
+ # do not fail other matrix runs if one fails
+ fail-fast: false
+ # set all platforms our test should run on
+ matrix:
+ platform: [ubuntu-latest, windows-latest]
# the steps our job runs **in order**
steps:
@@ -41,55 +49,72 @@ jobs:
# install system dependencies that Tauri needs to compile on Linux.
# note the extra dependencies for `tauri-driver` to run which are: `webkit2gtk-driver` and `xvfb`
- name: Tauri dependencies
+ if: matrix.platform == 'ubuntu-latest'
+ run: |
+ sudo apt-get update &&
+ sudo apt-get install -y \
+ libwebkit2gtk-4.1-dev \
+ libayatana-appindicator3-dev \
+ webkit2gtk-driver \
+ xvfb
+
+ # install a matching Microsoft Edge Driver version using msedgedriver-tool
+ - name: install msdgedriver (Windows)
+ if: matrix.platform == 'windows-latest'
run: |
- sudo apt update && sudo apt install -y \
- libwebkit2gtk-4.1-dev \
- build-essential \
- curl \
- wget \
- file \
- libxdo-dev \
- libssl-dev \
- libayatana-appindicator3-dev \
- librsvg2-dev \
- webkit2gtk-driver \
- xvfb
+ cargo install --git https://github.com/chippers/msedgedriver-tool
+ & "$HOME/.cargo/bin/msedgedriver-tool.exe"
+ $PWD.Path >> $env:GITHUB_PATH
+ # install latest stable Rust release
- name: Setup rust-toolchain stable
- id: rust-toolchain
uses: dtolnay/rust-toolchain@stable
- # we run our rust tests before the webdriver tests to avoid testing a broken application
+ # setup caching for the Rust target folder
+ - name: Setup Rust cache
+ uses: Swatinem/rust-cache@v2
+ with:
+ workspaces: src-tauri
+
+ # we run our Rust tests before the webdriver tests to avoid testing a broken application
- name: Cargo test
run: cargo test
- # build a release build of our application to be used during our WebdriverIO tests
- - name: Cargo build
- run: cargo build --release
-
# install the latest stable node version at the time of writing
- - name: Node 20
+ - name: Node 24
uses: actions/setup-node@v4
with:
- node-version: 20
+ node-version: 24
cache: 'yarn'
- # install our Node.js dependencies with Yarn
+ # install the application Node.js dependencies with Yarn
+ - name: Yarn install
+ run: yarn install --frozen-lockfile
+
+ # install the e2e-tests Node.js dependencies with Yarn
- name: Yarn install
run: yarn install --frozen-lockfile
- working-directory: webdriver/webdriverio
+ working-directory: e2e-tests
# install the latest version of `tauri-driver`.
# note: the tauri-driver version is independent of any other Tauri versions
- name: Install tauri-driver
run: cargo install tauri-driver --locked
- # run the WebdriverIO test suite.
+ # run the WebdriverIO test suite on Linux.
# we run it through `xvfb-run` (the dependency we installed earlier) to have a fake
# display server which allows our application to run headless without any changes to the code
- - name: WebdriverIO
+ - name: WebdriverIO (Linux)
+ if: matrix.platform == 'ubuntu-latest'
run: xvfb-run yarn test
- working-directory: webdriver/webdriverio
+ working-directory: e2e-tests
+
+ # run the WebdriverIO test suite on Windows.
+ # in this case we can run the tests directly.
+ - name: WebdriverIO (Windows)
+ if: matrix.platform == 'windows-latest'
+ run: yarn test
+ working-directory: e2e-tests
```
[previously built together]: /develop/tests/webdriver/example/webdriverio/
diff --git a/src/content/docs/develop/Tests/WebDriver/index.mdx b/src/content/docs/develop/Tests/WebDriver/index.mdx
index f736654a85..31cc83a05b 100644
--- a/src/content/docs/develop/Tests/WebDriver/index.mdx
+++ b/src/content/docs/develop/Tests/WebDriver/index.mdx
@@ -4,6 +4,7 @@ description: WebDriver Testing
sidebar:
order: 10
label: Overview
+i18nReady: true
---
[WebDriver] is a standardized interface to interact with web documents primarily intended for automated testing.
@@ -24,7 +25,7 @@ Because we currently utilize the platform's native [WebDriver] server, there are
### Linux
-We use `WebKitWebDriver` on Linux platforms. Check if this binary exists already (command `which WebKitWebDriver`) as
+We use `WebKitWebDriver` on Linux platforms. Check if this binary exists already by running the `which WebKitWebDriver` command as
some distributions bundle it with the regular WebKit package. Other platforms may have a separate package for them, such
as `webkit2gtk-driver` on Debian-based distributions.
@@ -34,6 +35,13 @@ Make sure to grab the version of [Microsoft Edge Driver] that matches your Windo
being built and tested on. This should almost always be the latest stable version on up-to-date Windows installs. If the
two versions do not match, you may experience your WebDriver testing suite hanging while trying to connect.
+You can use the [msedgedriver-tool](https://github.com/chippers/msedgedriver-tool) to download the appropriate Microsoft Edge Driver:
+
+```powershell
+cargo install --git https://github.com/chippers/msedgedriver-tool
+& "$HOME/.cargo/bin/msedgedriver-tool.exe"
+```
+
The download contains a binary called `msedgedriver.exe`. [`tauri-driver`] looks for that binary in the `$PATH` so make
sure it's either available on the path or use the `--native-driver` option on [`tauri-driver`]. You may want to download this automatically as part of the CI setup process to ensure the Edge, and Edge Driver versions
stay in sync on Windows CI machines. A guide on how to do this may be added at a later date.
@@ -44,12 +52,11 @@ Below are step-by-step guides to show how to create a minimal example applicatio
is tested with WebDriver.
If you prefer to see the result of the guide and look over a finished minimal codebase that utilizes it, you
-can look at https://github.com/chippers/hello_tauri.
+can look at https://github.com/tauri-apps/webdriver-example.
import { LinkCard, CardGrid } from '@astrojs/starlight/components';
- {
});
// we can use the spying tools provided by vitest to track the mocked function
- const spy = vi.spyOn(window, "__TAURI_INTERNALS__.invoke");
+ const spy = vi.spyOn(window.__TAURI_INTERNALS__, "invoke");
expect(invoke("add", { a: 12, b: 15 })).resolves.toBe(27);
expect(spy).toHaveBeenCalled();
@@ -124,6 +128,33 @@ mockIPC(async (cmd, args) => {
});
```
+### Mocking Events
+
+
+
+There is partial support of the [Event System] to simulate events emitted by your Rust code via the `shouldMockEvents` option:
+
+```javascript
+import { mockIPC, clearMocks } from '@tauri-apps/api/mocks';
+import { emit, listen } from '@tauri-apps/api/event';
+import { afterEach, expect, test, vi } from 'vitest';
+
+test('mocked event', () => {
+ mockIPC(() => {}, { shouldMockEvents: true }); // enable event mocking
+
+ const eventHandler = vi.fn();
+ listen('test-event', eventHandler);
+
+ emit('test-event', { foo: 'bar' });
+ expect(eventHandler).toHaveBeenCalledWith({
+ event: 'test-event',
+ payload: { foo: 'bar' },
+ });
+});
+```
+
+`emitTo` and `emit_filter` are **not** supported yet.
+
## Windows
Sometimes you have window-specific code (a splash screen window, for example), so you need to simulate different windows.
@@ -168,3 +199,4 @@ test('invoke', async () => {
[`mockwindows()`]: /reference/javascript/api/namespacemocks/#mockwindows
[`clearmocks()`]: /reference/javascript/api/namespacemocks/#clearmocks
[vitest]: https://vitest.dev
+[Event System]: /develop/calling-frontend/#event-system
diff --git a/src/content/docs/develop/_sections/frontend-listen.mdx b/src/content/docs/develop/_sections/frontend-listen.mdx
index c26d0a7bc4..7184d97899 100644
--- a/src/content/docs/develop/_sections/frontend-listen.mdx
+++ b/src/content/docs/develop/_sections/frontend-listen.mdx
@@ -1,7 +1,5 @@
---
title: Calling the Frontend from Rust
-sidebar:
- order: 1
---
The `@tauri-apps/api` NPM package offers APIs to listen to both global and webview-specific events.
@@ -66,8 +64,8 @@ appWebview.once('ready', () => {});
```
:::note
-Events emitted in the frontend also triggers listeners registed by these APIs.
-For more information see the [Calling Rust from the Frontend] documentation.
+Events emitted in the frontend also trigger listeners registered by these APIs.
+For more information, see the [Calling Rust from the Frontend] documentation.
:::
#### Listening to Events on Rust
diff --git a/src/content/docs/develop/calling-frontend.mdx b/src/content/docs/develop/calling-frontend.mdx
index 7c94f29253..4e70a34628 100644
--- a/src/content/docs/develop/calling-frontend.mdx
+++ b/src/content/docs/develop/calling-frontend.mdx
@@ -1,7 +1,6 @@
---
title: Calling the Frontend from Rust
-sidebar:
- order: 1
+i18nReady: true
---
import { Content as FrontendListen } from './_sections/frontend-listen.mdx';
@@ -162,20 +161,17 @@ use tauri::{AppHandle, ipc::Channel};
use serde::Serialize;
#[derive(Clone, Serialize)]
-#[serde(rename_all = "camelCase", tag = "event", content = "data")]
+#[serde(rename_all = "camelCase", rename_all_fields = "camelCase", tag = "event", content = "data")]
enum DownloadEvent<'a> {
- #[serde(rename_all = "camelCase")]
Started {
url: &'a str,
download_id: usize,
content_length: usize,
},
- #[serde(rename_all = "camelCase")]
Progress {
download_id: usize,
chunk_length: usize,
},
- #[serde(rename_all = "camelCase")]
Finished {
download_id: usize,
},
diff --git a/src/content/docs/develop/calling-rust.mdx b/src/content/docs/develop/calling-rust.mdx
index fadbd832e4..b480899f00 100644
--- a/src/content/docs/develop/calling-rust.mdx
+++ b/src/content/docs/develop/calling-rust.mdx
@@ -1,7 +1,6 @@
---
title: Calling Rust from the Frontend
-sidebar:
- order: 1
+i18nReady: true
---
import { Content as FrontendListen } from './_sections/frontend-listen.mdx';
@@ -37,7 +36,7 @@ Command names must be unique.
Commands defined in the `lib.rs` file cannot be marked as `pub` due to a limitation in the glue code generation.
You will see an error like this if you mark it as a public function:
-````
+```
error[E0255]: the name `__cmd__command_name` is defined multiple times
--> src/lib.rs:28:8
|
@@ -48,6 +47,7 @@ error[E0255]: the name `__cmd__command_name` is defined multiple times
|
= note: `__cmd__command_name` must be defined only once in the macro namespace of this module
```
+
:::
You will have to provide a list of your commands to the builder function like so:
@@ -60,7 +60,7 @@ pub fn run() {
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
-````
+```
Now, you can invoke the command from your JavaScript code:
@@ -237,7 +237,7 @@ invoke('login', { user: 'tauri', password: '0j4rijw8=' })
As mentioned above, everything returned from commands must implement [`serde::Serialize`], including errors.
This can be problematic if you're working with error types from Rust's std library or external crates as most error types do not implement it.
-In simple scenarios you can use `map_err` to convert these errors to `String`s:
+In simple scenarios you can use `map_err` to convert these errors to `String`:
```rust
#[tauri::command]
@@ -451,12 +451,35 @@ Commands can access an `AppHandle` instance:
```rust title="src-tauri/src/lib.rs"
#[tauri::command]
async fn my_custom_command(app_handle: tauri::AppHandle) {
- let app_dir = app_handle.path_resolver().app_dir();
+ let app_dir = app_handle.path().app_dir();
use tauri::GlobalShortcutManager;
app_handle.global_shortcut_manager().register("CTRL + U", move || {});
}
```
+:::tip
+
+`AppHandle` and `WebviewWindow` both take a generic parameter `R: Runtime`,
+when the `wry` feature is enabled in `tauri` (which is enabled by default),
+we default the generic to the `Wry` runtime so you can use it directly,
+but if you want to use a different runtime, for example the [mock runtime],
+you need to write your functions like this
+
+```rust title="src-tauri/src/lib.rs" ins="" ins=""
+use tauri::{AppHandle, GlobalShortcutManager, Runtime, WebviewWindow};
+
+#[tauri::command]
+async fn my_custom_command(app_handle: AppHandle, webview_window: WebviewWindow) {
+ let app_dir = app_handle.path().app_dir();
+ app_handle
+ .global_shortcut_manager()
+ .register("CTRL + U", move || {});
+ println!("WebviewWindow: {}", webview_window.label());
+}
+```
+
+:::
+
### Accessing Managed State
Tauri can manage state using the `manage` function on `tauri::Builder`.
@@ -642,7 +665,7 @@ Global events are delivered to **all** listeners
To trigger an event to a listener registered by a specific webview you can use the [event.emitTo] or the [WebviewWindow#emitTo] functions:
```js
-import { emit } from '@tauri-apps/api/event';
+import { emitTo } from '@tauri-apps/api/event';
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow';
// emitTo(webviewLabel, eventName, payload)
@@ -700,3 +723,4 @@ To learn how to listen to events and emit events from your Rust code, see the [R
[Rust Event System documentation]: /develop/calling-frontend/#event-system
[channels documentation]: /develop/calling-frontend/#channels
[Calling Rust from the Frontend]: /develop/calling-rust/
+[mock runtime]: https://docs.rs/tauri/2.0.0/tauri/test/struct.MockRuntime.html
diff --git a/src/content/docs/develop/configuration-files.mdx b/src/content/docs/develop/configuration-files.mdx
index 25b19c8b22..3c43d432e5 100644
--- a/src/content/docs/develop/configuration-files.mdx
+++ b/src/content/docs/develop/configuration-files.mdx
@@ -1,7 +1,6 @@
---
title: Configuration Files
-sidebar:
- order: 1
+i18nReady: true
---
import CommandTabs from '@components/CommandTabs.astro';
@@ -77,7 +76,7 @@ pubkey = "updater pub key"
endpoints = ["https://my.app.updater/{{target}}/{{current_version}}"]
```
-Note that JSON5 and TOML supports comments, and TOML can use kebab-case for config names which are more idiomatic.
+Note that JSON5 and TOML supports comments, and TOML can use kebab-case for config names which are more idiomatic. Field names are case-sensitive in all 3 formats.
### Platform-specific Configuration
@@ -139,7 +138,8 @@ The resolved configuration for Linux would be the following object:
"subcommands": {
"update": {}
}
- }
+ },
+ "deep-link": {}
}
}
```
@@ -163,20 +163,17 @@ For instance to distribute a completely isolated _beta_ application you can use
}
```
+And to distribute this separate _beta_ app you provide this configuration file when building it:
+
-And to distribute this separate _beta_ app you provide this configuration file when building it:
-
-```
-
-```
-
## `Cargo.toml`
Cargo's manifest file is used to declare Rust crates your app depends on, metadata about your app, and other Rust-related features. If you do not intend to do backend development using Rust for your app then you may not be modifying it much, but it's important to know that it exists and what it does.
@@ -204,14 +201,14 @@ serde = { version = "1.0", features = ["derive"] }
tauri = { version = "2.0.0", features = [ ] }
```
-The most important parts to take note of are the `tauri-build` and `tauri` dependencies. Generally, they must both be on the latest minor versions as the Tauri CLI, but this is not strictly required. If you encounter issues while trying to run your app you should check that any Tauri versions (`tauri` and `tauri-cli`) are on the latest versions for their respective minor releases.
+The most important parts to take note of are the `tauri-build` and `tauri` dependencies. Generally, they must both be on the same latest minor versions as the Tauri CLI, but this is not strictly required. If you encounter issues while trying to run your app you should check that any Tauri versions (`tauri` and `tauri-cli`) are on the latest versions for their respective minor releases.
Cargo version numbers use [Semantic Versioning]. Running `cargo update` in the `src-tauri` folder will pull the latest available Semver-compatible versions of all dependencies. For example, if you specify `2.0.0` as the version for `tauri-build`, Cargo will detect and download version `2.0.0.0` because it is the latest Semver-compatible version available. Tauri will update the major version number whenever a breaking change is introduced, meaning you should always be capable of safely upgrading to the latest minor and patch versions without fear of your code breaking.
If you want to use a specific crate version you can use exact versions instead by prepending `=` to the version number of the dependency:
```
-tauri-build = { version = "=2.0.0.0" }
+tauri-build = { version = "=2.0.0" }
```
An additional thing to take note of is the `features=[]` portion of the `tauri` dependency. Running `tauri dev` and `tauri build` will automatically manage which features need to be enabled in your project based on the your Tauri configuration. For more information about `tauri` feature flags see the [documentation][tauri Cargo features].
diff --git a/src/content/docs/develop/icons.mdx b/src/content/docs/develop/icons.mdx
new file mode 100644
index 0000000000..14ed8760b0
--- /dev/null
+++ b/src/content/docs/develop/icons.mdx
@@ -0,0 +1,119 @@
+---
+title: App Icons
+sidebar:
+ order: 1
+---
+
+{/* TODO: More platform specific explanations like macOS requiring padding in the icon (waiting for https://github.com/tauri-apps/tauri/pull/11037) */}
+
+import CommandTabs from '@components/CommandTabs.astro';
+
+Tauri ships with a default iconset based on its logo. This is NOT what you want when you ship your application. To remedy this common situation, Tauri provides the `icon` command that will take an input file (`"./app-icon.png"` by default) and create all the icons needed for the various platforms.
+
+:::note[Note on filetypes]
+
+- `icon.icns` = macOS
+- `icon.ico` = Windows
+- `*.png` = Linux
+- `Square*Logo.png` & `StoreLogo.png` = Currently unused but intended for AppX/MS Store targets.
+
+Some icon types may be used on platforms other than those listed above (especially `png`). Therefore we recommend including all icons even if you intend to only build for a subset of platforms.
+
+:::
+
+## Command Usage
+
+
+
+```console
+> pnpm tauri icon --help
+
+Generate various icons for all major platforms
+
+Usage: pnpm run tauri icon [OPTIONS] [INPUT]
+
+Arguments:
+ [INPUT] Path to the source icon (squared PNG or SVG file with transparency) [default: ./app-icon.png]
+
+Options:
+ -o, --output
## Distributing
@@ -123,16 +131,21 @@ For Linux you can distribute your app using the Debian package, Snap, AppImage,
href="/distribute/appimage/"
description="Distribute as an AppImage"
/>
+
-
+ /> */}
+:::note
+
+GUI apps on macOS and Linux do not inherit the `$PATH` from your shell dotfiles (`.bashrc`, `.bash_profile`, `.zshrc`, etc). Check out Tauri's [fix-path-env-rs](https://github.com/tauri-apps/fix-path-env-rs) crate to fix this issue.
+
+:::
+
## File structure
The macOS app bundle is a directory with the following structure:
diff --git a/src/content/docs/distribute/microsoft-store.mdx b/src/content/docs/distribute/microsoft-store.mdx
index 056b4dac3b..cc73c3acb8 100644
--- a/src/content/docs/distribute/microsoft-store.mdx
+++ b/src/content/docs/distribute/microsoft-store.mdx
@@ -2,6 +2,7 @@
title: Microsoft Store
sidebar:
order: 1
+i18nReady: true
---
import CommandTabs from '@components/CommandTabs.astro';
@@ -26,6 +27,7 @@ Use the `tauri icon` command to generate app icons from a single PNG or SVG sour
yarn="yarn tauri icon /path/to/app-icon.png"
pnpm="pnpm tauri icon /path/to/app-icon.png"
deno="deno task tauri icon /path/to/app-icon.png"
+ bun="bun tauri icon /path/to/app-icon.png"
cargo="cargo tauri icon /path/to/app-icon.png"
/>
@@ -71,6 +73,8 @@ yarn tauri bundle --config src-tauri/tauri.microsoftstore.conf.json"
pnpm tauri bundle --config src-tauri/tauri.microsoftstore.conf.json"
deno="deno task tauri build --no-bundle
deno task tauri bundle --config src-tauri/tauri.microsoftstore.conf.json"
+ bun="bun tauri build --no-bundle
+bun tauri bundle --config src-tauri/tauri.microsoftstore.conf.json"
cargo="cargo tauri build --no-bundle
cargo tauri bundle --config src-tauri/tauri.microsoftstore.conf.json"
/>
diff --git a/src/content/docs/distribute/rpm.mdx b/src/content/docs/distribute/rpm.mdx
index 0945592b9e..47ec8a9161 100644
--- a/src/content/docs/distribute/rpm.mdx
+++ b/src/content/docs/distribute/rpm.mdx
@@ -2,11 +2,12 @@
title: RPM
sidebar:
order: 1
+i18nReady: true
---
+import ShowSolution from '@components/ShowSolution.astro';
import CommandTabs from '@components/CommandTabs.astro';
-
-# Packaging for RPM
+import { Steps } from '@astrojs/starlight/components';
:::note
Some sections in this guide are optional. This includes configuring scripts and certain other steps. Feel free to adapt the instructions based on your specific needs and requirements.
@@ -14,6 +15,18 @@ Some sections in this guide are optional. This includes configuring scripts and
This guide covers how to distribute and manage RPM packages, including retrieving package information, configuring scripts, setting dependencies, and signing packages.
+:::note
+
+GUI apps on macOS and Linux do not inherit the `$PATH` from your shell dotfiles (`.bashrc`, `.bash_profile`, `.zshrc`, etc). Check out Tauri's [fix-path-env-rs](https://github.com/tauri-apps/fix-path-env-rs) crate to fix this issue.
+
+:::
+
+## Limitations
+
+Core libraries such as glibc frequently break compatibility with older systems. For this reason, you must build your Tauri application using the oldest base system you intend to support. A relatively old system such as Ubuntu 18.04 is more suited than Ubuntu 22.04, as the binary compiled on Ubuntu 22.04 will have a higher requirement of the glibc version, so when running on an older system, you will face a runtime error like `/usr/lib/libc.so.6: version 'GLIBC_2.33' not found`. We recommend using a Docker container or GitHub Actions to build your Tauri application for Linux.
+
+See the issues [tauri-apps/tauri#1355](https://github.com/tauri-apps/tauri/issues/1355) and [rust-lang/rust#57497](https://github.com/rust-lang/rust/issues/57497), in addition to the [AppImage guide](https://docs.appimage.org/reference/best-practices.html#binaries-compiled-on-old-enough-base-system) for more information.
+
## Configuring the RPM package
Tauri allows you to configure the RPM package by adding scripts, setting dependencies, adding a license, including custom files, and more.
@@ -120,8 +133,7 @@ echo "-------------"
- **obsoletes**: Lists the RPM dependencies that your application obsoletes.
:::note
-If this package is installed, packages listed as “obsoletes” will be automatically removed
-if present.
+If this package is installed, packages listed as "obsoletes" will be automatically removed if present.
:::
- **desktopTemplate**: Adds a custom desktop file to the package.
@@ -187,6 +199,7 @@ To build the RPM package, you can use the following command:
yarn="yarn tauri build"
pnpm="pnpm tauri build"
deno="deno task tauri build"
+ bun="bun tauri build"
cargo="cargo tauri build"
/>
@@ -227,6 +240,7 @@ Now you can build the package with the following command:
yarn="yarn tauri build"
pnpm="pnpm tauri build"
deno="deno task tauri build"
+ bun="bun tauri build"
cargo="cargo tauri build"
/>
@@ -342,3 +356,141 @@ Or for an already installed package:
```bash
rpm -Uvvh package_name.rpm
```
+
+## Cross-Compiling for ARM-based Devices
+
+This guide covers manual compilation. Check out our [GitHub Action guide](/distribute/pipelines/github/#arm-runner-compilation) for an example workflow that leverages QEMU to build the app. This will be much slower but will also be able to build AppImages.
+
+Manual compilation is suitable when you don't need to compile your application frequently and prefer a one-time setup. The following steps expect you to use a Linux distribution based on Debian/Ubuntu.
+
+
+
+1. #### Install Rust targets for your desired architecture
+ - For ARMv7 (32-bit): `rustup target add armv7-unknown-linux-gnueabihf`
+ - For ARMv8 (ARM64, 64-bit): `rustup target add aarch64-unknown-linux-gnu`
+
+2. #### Install the corresponding linker for your chosen architecture
+ - For ARMv7: `sudo apt install gcc-arm-linux-gnueabihf`
+ - For ARMv8 (ARM64): `sudo apt install gcc-aarch64-linux-gnu`
+
+3. #### Open or create the file `/.cargo/config.toml` and add the following configurations accordingly
+
+ ```toml
+ [target.armv7-unknown-linux-gnueabihf]
+ linker = "arm-linux-gnueabihf-gcc"
+
+ [target.aarch64-unknown-linux-gnu]
+ linker = "aarch64-linux-gnu-gcc"
+ ```
+
+4. #### Enable the respective architecture in the package manager
+ - For ARMv7: `sudo dpkg --add-architecture armhf`
+ - For ARMv8 (ARM64): `sudo dpkg --add-architecture arm64`
+
+5. #### Adjusting Package Sources
+
+ On Debian, this step should not be necessary, but on other distributions, you might need to edit /etc/apt/sources.list to include the ARM architecture variant. For example on Ubuntu 22.04 add these lines to the bottom of the file (Remember to replace jammy with the codename of your Ubuntu version):
+
+ ```
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy universe
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates universe
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy multiverse
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates multiverse
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security universe
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security multiverse
+ ```
+
+ Then, to prevent issues with the main packages, you have to add the correct main architecture to all other lines the file contained beforehand. For standard 64-bit systems you need to add [arch=amd64], the full file on Ubuntu 22.04 then looks similar to this:
+
+
+
+ ```
+ # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
+ # newer versions of the distribution.
+ deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted
+ # deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted
+
+ ## Major bug fix updates produced after the final release of the
+ ## distribution.
+ deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted
+ # deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted
+
+ ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
+ ## team. Also, please note that software in universe WILL NOT receive any
+ ## review or updates from the Ubuntu security team.
+ deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy universe
+ # deb-src http://archive.ubuntu.com/ubuntu/ jammy universe
+ deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates universe
+ # deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates universe
+
+ ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
+ ## team, and may not be under a free licence. Please satisfy yourself as to
+ ## your rights to use the software. Also, please note that software in
+ ## multiverse WILL NOT receive any review or updates from the Ubuntu
+ ## security team.
+ deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy multiverse
+ # deb-src http://archive.ubuntu.com/ubuntu/ jammy multiverse
+ deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates multiverse
+
+ ## N.B. software from this repository may not have been tested as
+ ## extensively as that contained in the main release, although it includes
+ ## newer versions of some applications which may provide useful features.
+ ## Also, please note that software in backports WILL NOT receive any review
+ ## or updates from the Ubuntu security team.
+ deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
+ # deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
+
+ deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security main restricted
+ # deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted
+ deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security universe
+ # deb-src http://security.ubuntu.com/ubuntu/ jammy-security universe
+ deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security multiverse
+ # deb-src http://security.ubuntu.com/ubuntu/ jammy-security multiverse
+
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy universe
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates universe
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy multiverse
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates multiverse
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security universe
+ deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security multiverse
+ ```
+
+
+
+6. #### Update the package information: `sudo apt-get update && sudo apt-get upgrade -y`
+
+7. #### Install the required webkitgtk library for your chosen architecture
+ - For ARMv7: `sudo apt install libwebkit2gtk-4.1-dev:armhf`
+ - For ARMv8 (ARM64): `sudo apt install libwebkit2gtk-4.1-dev:arm64`
+
+8. #### Install OpenSSL or use a vendored version
+
+ This is not always required so you may want to proceed first and check if you see errors like `Failed to find OpenSSL development headers`.
+ - Either install the development headers system-wide:
+ - For ARMv7: `sudo apt install libssl-dev:armhf`
+ - For ARMv8 (ARM64): `sudo apt install libssl-dev:arm64`
+ - Or enable the vendor feature for the OpenSSL Rust crate which will affect all other Rust dependencies using the same minor version. You can do so by adding this to the dependencies section in your `Cargo.toml` file:
+
+ ```toml
+ openssl-sys = {version = "0.9", features = ["vendored"]}
+ ```
+
+9. #### Set the `PKG_CONFIG_SYSROOT_DIR` to the appropriate directory based on your chosen architecture
+ - For ARMv7: `export PKG_CONFIG_SYSROOT_DIR=/usr/arm-linux-gnueabihf/`
+ - For ARMv8 (ARM64): `export PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu/`
+
+10. #### Build the app for your desired ARM version
+ - For ARMv7: cargo tauri build --target armv7-unknown-linux-gnueabihf
+ - For ARMv8 (ARM64): cargo tauri build --target aarch64-unknown-linux-gnu
+
+ Choose the appropriate set of instructions based on whether you want to cross-compile your Tauri application for ARMv7 or ARMv8 (ARM64). Please note that the specific steps may vary depending on your Linux distribution and setup.
+
+
diff --git a/src/content/docs/distribute/snapcraft.mdx b/src/content/docs/distribute/snapcraft.mdx
index 477278344b..c79d067793 100644
--- a/src/content/docs/distribute/snapcraft.mdx
+++ b/src/content/docs/distribute/snapcraft.mdx
@@ -2,6 +2,7 @@
title: Snapcraft
sidebar:
order: 1
+i18nReady: true
---
## Prerequisites
@@ -83,6 +84,24 @@ apps:
# - network
# Add whatever plugs you need here, see https://snapcraft.io/docs/snapcraft-interfaces for more info.
# The gnome extension already includes [ desktop, desktop-legacy, gsettings, opengl, wayland, x11, mount-observe, calendar-service ]
+ # - single-instance-plug # add this if you're using the single-instance plugin
+ #slots:
+ # Add the slots you need to expose to other snaps
+ # - single-instance-plug # add this if you're using the single-instance plugin
+
+# Add these lines only if you're using the single-instance plugin
+# Check https://v2.tauri.app/plugin/single-instance/ for details
+#slots:
+# single-instance:
+# interface: dbus
+# bus: session
+# name: org.net_mydomain_MyApp.SingleInstance # Remember to change net_mydomain_MyApp to your app ID with "_" instead of "." and "-"
+#
+#plugs:
+# single-instance-plug:
+# interface: dbus
+# bus: session
+# name: org.net_mydomain_MyApp.SingleInstance # Remember to change net_mydomain_MyApp to your app ID with "_" instead of "." and "-"
package-repositories:
- type: apt
@@ -129,9 +148,7 @@ parts:
- The `package-repositories` section allows you to add a package repository to help you satisfy your dependencies.
- `build-packages`/`build-snaps` defines the build dependencies for your snap.
- `stage-packages`/`stage-snaps` defines the runtime dependencies for your snap.
-- The `override-pull` section runs a series of commands before the sources are pulled.
-- `craftctl default` performs the default pull commands.
-- The `organize` section moves your files to the proper directories so that the binary and desktop file can be exposed to the `apps` sections.
+- The `override-build` section runs a series of commands after the sources were pulled.
## Building
diff --git a/src/content/docs/distribute/windows-installer.mdx b/src/content/docs/distribute/windows-installer.mdx
index 6e7555284a..1cfe34c8bc 100644
--- a/src/content/docs/distribute/windows-installer.mdx
+++ b/src/content/docs/distribute/windows-installer.mdx
@@ -2,6 +2,7 @@
title: Windows Installer
sidebar:
order: 1
+i18nReady: true
---
import CommandTabs from '@components/CommandTabs.astro';
@@ -10,8 +11,8 @@ import { Tabs, TabItem } from '@astrojs/starlight/components';
Tauri applications for Windows are either distributed as Microsoft Installers (`.msi` files) using the [WiX Toolset v3]
or as setup executables (`-setup.exe` files) using [NSIS].
-Please note that `.msi` installers can **only be created on Windows** as cross-compilation doesn't work.
-Cross-compilation for NSIS installers is currently experimental.
+Please note that `.msi` installers can **only be created on Windows** as WiX can only run on Windows systems.
+Cross-compilation for NSIS installers is shown below.
This guide provides information about available customization options for the installer.
@@ -24,18 +25,27 @@ To build and bundle your app into a Windows installer you can use the Tauri CLI
yarn="yarn tauri build"
pnpm="pnpm tauri build"
deno="deno task tauri build"
+ bun="bun tauri build"
cargo="cargo tauri build"
/>
-### Experimental: Build Windows apps on Linux and macOS
+:::note[VBSCRIPT requirement for MSI packages]
-Cross compiling Windows apps on Linux and macOS hosts is possible when using [NSIS].
-Note that this is currently considered highly experimental and may not work on every system or for every project.
+Building MSI packages (`"targets": "msi"` or `"targets": "all"` in `tauri.conf.json`) requires the VBSCRIPT optional feature to be enabled on Windows. This feature is enabled by default on most Windows installations, but if you encounter errors like `failed to run light.exe`, you may need to enable it manually through **Settings** → **Apps** → **Optional features** → **More Windows features**. See the [Prerequisites guide](/start/prerequisites/#vbscript-for-msi-installers) for detailed instructions.
+
+:::
+
+### Build Windows apps on Linux and macOS
+
+Cross compiling Windows apps on Linux and macOS hosts is possible with caveats when using [NSIS].
+It is not as straight forward as compiling on Windows directly and is not tested as much.
Therefore it should only be used as a last resort if local VMs or CI solutions like GitHub Actions don't work for you.
:::note
+
Signing cross compiled Windows installers requires an external signing tool.
See the [signing documentation] for more information.
+
:::
Since Tauri officially only supports the MSVC Windows target, the setup is a bit more involved.
@@ -128,6 +138,7 @@ Now it should be as simple as adding the runner and target to the `tauri build`
yarn="yarn tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc"
pnpm="pnpm tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc"
deno="deno task tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc"
+ bun="bun tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc"
cargo="cargo tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc"
/>
@@ -145,8 +156,9 @@ using the `--target` flag:
npm="npm run tauri build -- --target i686-pc-windows-msvc"
yarn="yarn tauri build --target i686-pc-windows-msvc"
pnpm="pnpm tauri build --target i686-pc-windows-msvc"
- cargo="cargo tauri build --target i686-pc-windows-msvc"
deno="deno task tauri build --target i686-pc-windows-msvc"
+ bun="bun tauri build --target i686-pc-windows-msvc"
+ cargo="cargo tauri build --target i686-pc-windows-msvc"
/>
By default, Rust only installs toolchains for your machine's target,
@@ -162,6 +174,7 @@ Now you can add the rust target with `rustup target add aarch64-pc-windows-msvc`
yarn="yarn tauri build --target aarch64-pc-windows-msvc"
pnpm="pnpm tauri build --target aarch64-pc-windows-msvc"
deno="deno task tauri build --target aarch64-pc-windows-msvc"
+ bun="bun tauri build --target aarch64-pc-windows-msvc"
cargo="cargo tauri build --target aarch64-pc-windows-msvc"
/>
@@ -187,11 +200,11 @@ tauri-plugin-notification = { version = "2.0.0", features = [ "windows7-compat"
## FIPS Compliance
-If your system requires the MSI bundle to be FIPS compliant you can set the `TAURI_FIPS_COMPLIANT` environment variable to `true`
+If your system requires the MSI bundle to be FIPS compliant you can set the `TAURI_BUNDLER_WIX_FIPS_COMPLIANT` environment variable to `true`
before running `tauri build`. In PowerShell you can set it for the current terminal session like this:
```powershell
-$env:TAURI_FIPS_COMPLIANT="true"
+$env:TAURI_BUNDLER_WIX_FIPS_COMPLIANT="true"
```
## WebView2 Installation Options
@@ -518,7 +531,7 @@ Supported hooks are:
- `NSIS_HOOK_PREUNINSTALL`: Runs before removing any files, registry keys and shortcuts.
- `NSIS_HOOK_POSTUNINSTALL`: Runs after files, registry keys and shortcuts have been removed.
-For example, create a `hooks.nsi` file in the `src-tauri/windows` folder and define the hooks you need:
+For example, create a `hooks.nsh` file in the `src-tauri/windows` folder and define the hooks you need:
```nsh
!macro NSIS_HOOK_PREINSTALL
@@ -545,13 +558,74 @@ Then you must configure Tauri to use that hook file:
"bundle": {
"windows": {
"nsis": {
- "installerHooks": "./windows/hooks.nsi"
+ "installerHooks": "./windows/hooks.nsh"
}
}
}
}
```
+#### Installing Dependencies with Hooks
+
+You can use installer hooks to automatically install system dependencies that your application requires. This is particularly useful for runtime dependencies like Visual C++ Redistributables, DirectX, OpenSSL or other system libraries that may not be present on all Windows systems.
+
+**MSI Installer Example (Visual C++ Redistributable):**
+
+```nsh
+!macro NSIS_HOOK_POSTINSTALL
+ ; Check if Visual C++ 2019 Redistributable is installed (via Windows Registry)
+ ReadRegDWord $0 HKLM "SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" "Installed"
+
+ ${If} $0 == 1
+ DetailPrint "Visual C++ Redistributable already installed"
+ Goto vcredist_done
+ ${EndIf}
+
+ ; Install from bundled MSI if not installed
+ ${If} ${FileExists} "$INSTDIR\resources\vc_redist.x64.msi"
+ DetailPrint "Installing Visual C++ Redistributable..."
+ ; Copy to TEMP folder and then execute installer
+ CopyFiles "$INSTDIR\resources\vc_redist.x64.msi" "$TEMP\vc_redist.x64.msi"
+ ExecWait 'msiexec /i "$TEMP\vc_redist.x64.msi" /passive /norestart' $0
+
+ ; Check wether installation process exited successfully (code 0) or not
+ ${If} $0 == 0
+ DetailPrint "Visual C++ Redistributable installed successfully"
+ ${Else}
+ MessageBox MB_ICONEXCLAMATION "Visual C++ installation failed. Some features may not work."
+ ${EndIf}
+
+ ; Clean up setup files from TEMP and your installed app
+ Delete "$TEMP\vc_redist.x64.msi"
+ Delete "$INSTDIR\resources\vc_redist.x64.msi"
+ ${EndIf}
+
+ vcredist_done:
+!macroend
+```
+
+**Key considerations:**
+
+- A good practice is to always check if the dependency is already installed using registry keys or file existence or via Windows [where] command.
+- Use `/passive`, `/quiet`, or `/silent` flags to avoid interrupting the installation flow. Check out [msiexec] options for `.msi` files, or the setup manual for app-specific flags
+- Include `/norestart` to prevent automatic system reboots during installation for setups that restarts user devices
+- Clean up temporary files and bundled installers to avoid bloating the application
+- Consider that dependencies might be shared with other applications when uninstalling
+- Provide meaningful error messages if installation fails
+
+Ensure to bundle the dependency installers in your `src-tauri/resources` folder and add to `tauri.conf.json` so they get bundled, and can be accessed during installation from `$INSTDIR\resources\`:
+
+```json title="tauri.conf.json"
+{
+ "bundle": {
+ "resources": [
+ "resources/my-dependency.exe",
+ "resources/another-one.msi
+ ]
+ }
+}
+```
+
### Install Modes
By default the installer will install your application for the current user only.
@@ -642,3 +716,5 @@ to verify the current Webview2 version and run the Webview2 bootstrapper if it d
[NSIS configuration]: /reference/config/#nsisconfig
[installMode]: /reference/config/#installmode
[NSISInstallerMode]: /reference/config/#nsisinstallermode
+[where]: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/where
+[msiexec]: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec
diff --git a/src/content/docs/es/about/book.md b/src/content/docs/es/about/book.md
new file mode 100644
index 0000000000..858321461c
--- /dev/null
+++ b/src/content/docs/es/about/book.md
@@ -0,0 +1,32 @@
+---
+title: El libro de Tauri
+i18nReady: true
+---
+
+:::note[Actualización del progreso]
+
+Estamos trabajando activamente en la autoría y redacción del Libro de Tauri. Hemos sufrido retrasos debido al inmenso crecimiento de Tauri, pero recientemente hemos vuelto a dar prioridad a este proyecto. Aunque todavía no tenemos detalles sobre los plazos de publicación, puedes estar atento a esta página para estar al día.
+
+Nos gustaría pedir disculpas por este retraso más allá de la fecha de publicación originalmente comunicada. Si has donado a través de GitHub Sponsors u Open Collective y deseas solicitar un reembolso, puedes hacerlo a través de Open Collective: [Contacta con Tauri en Open Collective](https://opencollective.com/tauri/contact).
+
+:::
+
+### Visión general
+
+El Libro de Tauri te guiará a través de la historia de Tauri y las decisiones de diseño que hemos tomado. También hablará en profundidad de por qué la privacidad, la seguridad y la sostenibilidad son discusiones importantes y fundamentales que puedes aplicar a cualquier proyecto de software moderno.
+
+Los temas incluidos son:
+
+- El método y el razonamiento que hay detrás del diseño de Tauri.
+- Las opciones que tienes al construir con Tauri.
+- Que no tienes que elegir entre enviar rápido y ser sostenible y responsable.
+- Por qué elegimos el lenguaje Rust como capa de enlace y aplicación para Tauri.
+- Por qué es importante una revisión binaria.
+
+### Historia
+
+En 2020, la fabricación de aplicaciones nativas se ha vuelto más fácil y accesible que nunca. Sin embargo, tanto los principiantes como los desarrolladores experimentados se enfrentan a decisiones difíciles en un panorama de seguridad y privacidad que cambia rápidamente. Esto es especialmente cierto en el entorno semiconfiable de los dispositivos de usuario.
+
+Tauri elimina las conjeturas de la ecuación, ya que fue diseñado desde cero para adoptar nuevos paradigmas de desarrollo seguro y flexibilidad creativa que aprovechan las características del lenguaje Rust y te permite construir una aplicación utilizando cualquier framework de frontend que desees. Descubre cómo puedes diseñar, construir, auditar y desplegar aplicaciones nativas diminutas, rápidas, robustas y seguras para las principales plataformas de escritorio y móviles, todo ello a partir exactamente del mismo código base y en un tiempo récord, sin necesidad siquiera de conocer el lenguaje de programación Rust.
+
+Los autores y cofundadores de Tauri, Daniel y Lucas, te llevan en un viaje de la teoría a la ejecución, durante el cual aprenderás por qué se construyó Tauri y cómo funciona bajo el capó. Junto con los puntos de vista de los invitados que se especializan en código abierto, DevOps, seguridad y arquitectura empresarial, este libro también presenta discusiones filosóficas con formato de discurso y puntos de vista de sostenibilidad de código abierto de los que sus aplicaciones de próxima generación se beneficiarán - y sus usuarios se beneficiarán.
diff --git a/src/content/docs/es/about/governance.md b/src/content/docs/es/about/governance.md
new file mode 100644
index 0000000000..cd6fb163f8
--- /dev/null
+++ b/src/content/docs/es/about/governance.md
@@ -0,0 +1,50 @@
+---
+title: Gobernanza de Tauri
+i18nReady: true
+---
+
+Uno de los principales objetivos de la estructura organizativa de Tauri es garantizar que nos mantenemos fieles a nuestros valores de código abierto y lo hacemos de forma sostenible, respetando la salud y el bienestar de los contribuyentes. [El Programa Tauri dentro de Commons Conservancy](https://dracc.commonsconservancy.org/0035/) se estableció para comprometerse con esos valores y facilitar un proceso de gobernanza abierto, transparente y eficiente a lo largo del futuro desarrollo de Tauri y sus materiales auxiliares.
+
+## Grupo de Trabajo de Tauri
+
+El Grupo de Trabajo Tauri es el marco colectivo creado para hacer posible este proceso de gobernanza. Está formado por los siguientes componentes:
+
+- Miembros del Grupo de Trabajo
+- Junta Directiva de Tauri
+- Dominios y dominios potenciales
+- Equipos
+
+
+
+### Miembros del Grupo de Trabajo
+
+Todas las personas que componen el Grupo de Trabajo Tauri.
+
+### Junta Directiva de Tauri
+
+La Junta Directiva de Tauri es el órgano central de toma de decisiones del Programa Tauri y es responsable de la salud y estabilidad general del Programa Tauri. La Junta vota las decisiones más importantes del Programa y las cuestiones planteadas por el Grupo de Trabajo.
+
+Un Director de la Junta puede ser un colaborador técnico, ser parte interesada en el futuro de Tauri, compartir experiencia de la industria o tener pasión por los aspectos normativos y legales dentro del Código Abierto.
+
+### Dominios y Líderes de Dominios
+
+Los dominios son unidades organizativas que representan un área de interés dentro de Tauri.
+
+Los líderes de dominio son colaboradores de confianza dentro de la comunidad Tauri con experiencia en el dominio que lideran. Son responsables de establecer la dirección, supervisar y apoyar las actividades dentro de ese dominio.
+
+Los dominios y líderes de dominio actuales se describen en el repositorio de [Gobernanza y Orientación en GitHub](https://github.com/tauri-apps/governance-and-guidance).
+
+### Equipos
+
+Los equipos son pequeños grupos de colaboradores que apoyan o mantienen áreas específicas del Programa Tauri. Son un medio para que Tauri ejecute sus tareas y objetivos a más largo plazo, especialmente cuando las contribuciones ad hoc no pueden lograr los mismos resultados.
+
+## Involúcrate
+
+Si estás interesado en convertirte en Director de la Junta de Tauri o en Líder de Dominio, las elecciones para esos puestos se celebran a lo largo del año. En el caso de los líderes de dominio, se celebran en primavera y otoño, y en el de los directores del consejo, en verano. Las instrucciones para presentar tu candidatura se publican en el [Blog de Tauri](https://tauri.app/blog) antes de cada elección.
+
+## Recursos Adicionales
+
+- [Repositorio de Gobernanza y Orientación](https://github.com/tauri-apps/governance-and-guidance): Información más detallada sobre la Gobernanza de Tauri y los actuales Dominios y Líderes de Dominio
+- [Contrato Social](https://github.com/tauri-apps/governance-and-guidance/blob/main/SOCIAL_CONTRACT.md): El contrato social informa nuestra toma de decisiones y nuestra organización.
+- [Código de Conducta](https://github.com/tauri-apps/governance-and-guidance/blob/main/CODE_OF_CONDUCT.md)
+- [Estatutos del Programa Tauri](https://dracc.commonsconservancy.org/0035/)
diff --git a/src/content/docs/es/about/index.mdx b/src/content/docs/es/about/index.mdx
new file mode 100644
index 0000000000..673d73ebfa
--- /dev/null
+++ b/src/content/docs/es/about/index.mdx
@@ -0,0 +1,30 @@
+---
+title: Sobre Tauri
+i18nReady: true
+---
+
+:::tip
+
+Si lo que buscas es una rápida descripción técnica y empezar a crear una aplicación, visita la página [¿Qué es Tauri?](/es/start/). Si quieres saber más sobre la filosofía del proyecto, sigue leyendo.
+
+:::
+
+import { LinkCard, CardGrid } from '@astrojs/starlight/components';
+
+
+
+
+
+
diff --git a/src/content/docs/es/about/philosophy.md b/src/content/docs/es/about/philosophy.md
new file mode 100644
index 0000000000..e14a8879e0
--- /dev/null
+++ b/src/content/docs/es/about/philosophy.md
@@ -0,0 +1,47 @@
+---
+title: Filosofía de Tauri
+i18nReady: true
+---
+
+Tauri es un conjunto de herramientas que ayuda a los desarrolladores a crear aplicaciones para las principales plataformas de escritorio, utilizando prácticamente cualquier framework frontend existente. El núcleo está construido con Rust, y la CLI aprovecha Node.js haciendo de Tauri un enfoque genuinamente polifacético para crear y mantener grandes aplicaciones.
+
+
+
+## Seguridad Ante Todo
+
+En el mundo actual, todo modelo honesto de amenaza asume que el dispositivo del usuario ya ha sido comprometido. Esto pone a los desarrolladores de aplicaciones en una situación complicada, porque si el dispositivo ya está en peligro, ¿cómo se puede confiar en el software?
+
+Una defensa en profundidad es el enfoque que hemos adoptado. Queremos que seas capaz de tomar todas las precauciones posibles para minimizar la superficie que presentas a los atacantes. Tauri te permite elegir qué puntos finales de API enviar, si quieres o no un servidor localhost integrado en tu aplicación, e incluso aleatoriza los manejadores funcionales en tiempo de ejecución. Estas y otras técnicas forman una línea de base segura que te capacita a ti y a tus usuarios.
+
+Ralentizar a los atacantes dificultando enormemente los ataques estáticos y aislando los sistemas entre sí es el nombre del juego. Y si vienes del ecosistema Electron, puedes estar tranquilo: por defecto, Tauri solo distribuye binarios, no archivos ASAR.
+
+Al elegir construir Tauri con la seguridad como fuerza guía, te damos todas las oportunidades para adoptar una postura de seguridad proactiva.
+
+## Políformismos, no Silos
+
+La mayoría de frameworks contemporáneos utilizan un único paradigma lingüístico y, por tanto, están atrapados en una burbuja de conocimientos e idiomas. Esto puede funcionar bien para determinadas aplicaciones de nicho, pero también fomenta una especie de tribalismo.
+
+Esto puede verse en la forma en que las comunidades de desarrollo de React, Angular y Vue se apiñan en sus pilas, generando en última instancia muy poca polinización cruzada.
+
+Esta misma situación puede observarse en los campos de batalla Rust vs. Node vs. C++, donde los partidarios de la línea dura adoptan sus posturas y se niegan a colaborar entre comunidades.
+
+Hoy en día, Tauri utiliza Rust para el backend - pero en un futuro no muy lejano, otros backends como Go, Nim, Python, Csharp, etc. serán posibles. Esto se debe a que estamos manteniendo los enlaces oficiales de Rust a la organización [webview](https://github.com/webview) y planeamos permitirte cambiar el backend según tus necesidades. Dado que nuestra API puede implementarse en cualquier lenguaje con interoperabilidad con C, la conformidad total está sólo a un PR de distancia.
+
+## Código Abierto Honesto
+
+Nada de esto tendría sentido sin una comunidad. Hoy en día, las comunidades de software son lugares increíbles donde la gente se ayuda mutuamente y hace cosas increíbles.
+
+El código abierto significa cosas distintas para cada persona, pero la mayoría estará de acuerdo en que sirve para apoyar la libertad. Cuando el software no respeta tus derechos, puede parecer injusto y comprometer potencialmente tus libertades al funcionar de forma poco ética.
+
+Por eso estamos orgullosos de que los defensores del FLOSS puedan crear aplicaciones con Tauri que sean "certificablemente" de código abierto y puedan incluirse en distribuciones GNU/Linux respaldadas por la FSF.
+
+## El Futuro
+
+El futuro de Tauri depende de tu implicación y tus contribuciones. Pruébalo, presenta problemas, únete a un grupo de trabajo o haz una donación - cada contribución es importante. En cualquier caso, no dudes en ponerte en contacto con nosotros.
diff --git a/src/content/docs/es/about/trademark.md b/src/content/docs/es/about/trademark.md
new file mode 100644
index 0000000000..0b339de2c8
--- /dev/null
+++ b/src/content/docs/es/about/trademark.md
@@ -0,0 +1,118 @@
+---
+title: Directrices sobre Marcas
+i18nReady: true
+---
+
+Esta política de marcas comerciales se ha elaborado para ayudarle a entender cómo utilizar las marcas comerciales, marcas de servicio y logotipos de TAURI propiedad del Programa Tauri dentro de Commons Conservancy.
+
+Aunque nuestro software está disponible bajo una licencia de software libre y de código abierto, esa licencia de derechos de autor no incluye una licencia para utilizar nuestra marca, y esta Política pretende explicar cómo utilizar nuestras marcas de forma coherente con la legislación de fondo y las expectativas de la comunidad.
+
+**Esta política cubre:**
+
+- ONuestras marcas denominativas y de servicios: TAURI, TAO, WRY.
+- Nuestros logotipos: Los logotipos TAURI, TAO, WRY (y todos los derivados visuales).
+
+Esta política abarca todas las marcas comerciales y de servicios, estén registradas o no.
+
+## Directrices generales
+
+Siempre que utilices una de nuestras marcas, debe hacerlo de forma que no induzca a error a nadie sobre lo que está recibiendo y de quién. Por ejemplo, no puede decir que está distribuyendo software TAURI cuando lo que está distribuyendo es una versión modificada del mismo (también conocida como Fork), porque los destinatarios podrían no entender las diferencias entre sus versiones modificadas y las nuestras.
+
+Tampoco puedes utilizar nuestro logotipo en su sitio web de forma que sugiera que su sitio web es un sitio web oficial o que nosotros respaldamos su sitio web.
+
+Sin embargo, puedes decir que te gusta el software TAURI, que participa en la comunidad TAURI, que proporciona una versión no modificada del software TAURI.
+
+No podrá utilizar ni registrar nuestras marcas, o variaciones de las mismas, como parte de su propia marca comercial, marca de servicio, nombre de dominio, nombre de empresa, nombre comercial, nombre de producto o nombre de servicio.
+
+La legislación sobre marcas no permite el uso de nombres o marcas demasiado similares a los nuestros. Por lo tanto, no puedes utilizar una variación obvia de cualquiera de nuestras marcas o cualquier equivalente fonético, equivalente en un idioma extranjero, despegue o abreviatura de un producto o servicio similar o compatible. Consideraríamos lo siguiente demasiado similar a una de nuestras Marcas:
+
+- TAURIMAGE
+- Aplicación de Tauri Wallet
+
+## Usos Aceptados
+
+### Aplicaciones
+
+TAURI es un marco para crear aplicaciones para dispositivos informáticos. Puedes afirmar que tu aplicación utiliza TAURI, pero debes tener cuidado para evitar dar la impresión de que tu aplicación está aprobada por el Programa Tauri dentro de Commons Conservancy, o que es una aplicación oficial. Debes tener cuidado de no enviar su aplicación con el ICONO por defecto.
+
+### Plugins y Plantillas
+
+Puedes publicar el código de plugins y plantillas utilizando las convenciones de nomenclatura apropiadas, pero por favor, menciona que estos trabajos no están aprobados oficialmente. Solo se consideran oficiales las bases de código gestionadas por la organización dentro de la organización de GitHub `tauri-apps`.
+
+## Modificaciones del Núcleo (Forks)
+
+Si distribuyes una versión modificada de nuestro software (TAURI CORE), debe eliminar de ella todos nuestros logotipos y nombres. Debes conservar nuestra licencia original en formato SPDX. Puedes utilizar nuestras marcas denominativas, pero no nuestros logotipos, para describir con veracidad el origen del software que está proporcionando. Por ejemplo, si el código que distribuyes es una modificación de nuestro software, puedes decir: "Este software se deriva del código fuente del software TAURI".
+
+### Declaraciones Sobre Compatibilidad
+
+Puedes utilizar las marcas denominativas, pero no los logotipos, para describir con veracidad la relación entre tu software y el nuestro. Cualquier otro uso puede implicar que hemos certificado o aprobado tu software. Si deseas utilizar nuestros logotipos, póngase en contacto con nosotros para tratar los términos de la licencia.
+
+### Nombres de Productos Compatibles
+
+Si deseas describir tu producto haciendo referencia al software TAURI, estas son las condiciones en las que puede hacerlo. Puedes llamar a su software XYZ (donde XYZ es el nombre de tu producto) para TAURI sólo si:
+
+- Todas las versiones del software TAURI que entregues con tu producto son los binarios exactos proporcionados por nosotros, o fabricados por el núcleo del software y las herramientas que proporcionamos.
+- Tu producto es totalmente compatible con las API del software TAURI.
+- Utiliza la siguiente leyenda en materiales de marketing o descripciones de productos: "TAURI es una marca comercial del Progama de Tauri dentro de Commons Conservancy. https://tauri.app/"
+
+### Grupos de Usuarios
+
+Puedes utilizar las marcas de Word como parte del nombre de su grupo de usuarios siempre que:
+
+- El objetivo principal del grupo es nuestro software.
+- El grupo no obtiene beneficios.
+- Los gastos de asistencia a las reuniones se limitan a cubrir los costes del local, la comida y la bebida.
+
+No estás autorizado a celebrar una conferencia utilizando nuestras marcas.
+
+### Sin Nombres de Dominio
+
+No debes registrar ningún dominio que incluya nuestras marcas denominativas o cualquier variante o combinación de las mismas.
+
+### Otros Usos Lucrativos de las Marcas TAURI
+
+Si estás realizando un vídeo, una serie de tutoriales, un libro u otro material educativo por el que recibas un pago a través de suscripciones, ventas, publicidad o similares, debe obtener un permiso explícito de licencia del Programa Tauri dentro de Commons Conservancy.
+
+## Cómo Mostrar Nuestras Marcas
+
+Cuando tengas derecho a utilizar nuestra marca, le indicamos cómo exhibirla.
+
+### Marcas y Leyendas Comerciales
+
+La primera mención o la mención más destacada de una marca en una página web, documento o documentación debe ir acompañada de un símbolo que indique si la marca es una marca registrada ("®") o una marca no registrada ("™"). Si no sabes cuál se aplica, ponte en contacto con nosotros. (La propia TAURI es una marca registrada).
+
+Coloca el siguiente aviso al pie de la página en la que hayas utilizado la marca: TAURI es una marca registrada de [El Programa Tauri dentro de Commons Conservancy]".
+
+### Uso de Marcas Comerciales en Textos
+
+Utiliza siempre las marcas registradas en su forma exacta y con la ortografía correcta, sin abreviar, separar con guiones ni combinar con ninguna otra palabra o palabras.
+
+- Inaceptable: TAUREE
+- Aceptable: TAURI
+
+No pluralice una marca.
+
+- Inaceptable: Tengo diecisiete TAURIs funcionando en mi ordenador.
+- Aceptable: Estoy ejecutando diecisiete aplicaciones TAURI en mi ordenador y me sobra ram.
+
+Utiliza siempre una marca como adjetivo que modifica a un sustantivo.
+
+- Inaceptable: Esto es un TAURI.
+- Aceptable: Esto es una aplicación de sofware TAURI.
+
+### Uso de los Logos
+
+No puedes modificar ningún logotipo salvo para escalarlo. Esto significa que no puedes añadir elementos decorativos, cambiar los colores, modificar las proporciones, distorsionarlo, añadir elementos ni combinarlo con otros logotipos.
+
+Disponemos de una versión de alto contraste del logotipo, que puede descargar en la sección de elementos.
+
+## Elementos
+
+- Aquí puedes descargar las [Directrices de la marca](/assets/brand_guidelines.pdf) completas - (PDF, 74,3 MB)
+- Aquí puedes descargar los formatos SVG y PNG del LOGOTIPO y el Wordmark en el [Logopack](/assets/logopack.zip) - (ZIP, 203 KB)
+
+---
+
+El Programa Tauri de Commons Conservancy se reserva todos los derechos a modificar estas directrices sobre marcas comerciales en cualquier momento. Si tienes alguna pregunta o consulta, envíanos un correo electrónico a `trademark@tauri.app`.
+
+Estas directrices se basan en las Directrices sobre el modelo de marca, disponibles en http://www.modeltrademarkguidelines.org, utilizadas bajo una licencia Creative Commons Attribution 3.0 Unported: https://creativecommons.org/licenses/by/3.0/deed.en_EU. Versión 1.0 del 20 de agosto de 2022
diff --git a/src/content/docs/es/plugin/autostart.mdx b/src/content/docs/es/plugin/autostart.mdx
new file mode 100644
index 0000000000..e7022c6564
--- /dev/null
+++ b/src/content/docs/es/plugin/autostart.mdx
@@ -0,0 +1,158 @@
+---
+title: Inicio automático
+description: Inicia automáticamente tu aplicación al arrancar el sistema.
+plugin: autostart
+i18nReady: true
+---
+
+import PluginLinks from '@components/PluginLinks.astro';
+import Compatibility from '@components/plugins/Compatibility.astro';
+
+import { Tabs, TabItem, Steps } from '@astrojs/starlight/components';
+import CommandTabs from '@components/CommandTabs.astro';
+import PluginPermissions from '@components/PluginPermissions.astro';
+
+
+
+Inicia automáticamente tu aplicación al arrancar el sistema.
+
+## Plataformas compatibles
+
+
+
+## Configuración
+
+Instala el plugin de autostart para comenzar.
+
+
+
+
+ Usa el gestor de paquetes de tu proyecto para añadir la dependencia:
+
+ {' '}
+
+
+
+
+
+
+
+ 1. Ejecuta el siguiente comando en la carpeta `src-tauri` para añadir el plugin a las dependencias del proyecto en `Cargo.toml`:
+
+ ```sh frame=none
+ cargo add tauri-plugin-autostart --target 'cfg(any(target_os = "macos", windows, target_os = "linux"))'
+ ```
+
+ 2. Modifica `lib.rs` para inicializar el plugin:
+
+ ```rust title="src-tauri/src/lib.rs" ins={5-6}
+ #[cfg_attr(mobile, tauri::mobile_entry_point)]
+ pub fn run() {
+ tauri::Builder::default()
+ .setup(|app| {
+ #[cfg(desktop)]
+ app.handle().plugin(tauri_plugin_autostart::init(tauri_plugin_autostart::MacosLauncher::LaunchAgent, Some(vec!["--flag1", "--flag2"]) /* arbitrary number of args to pass to your app */));
+ Ok(())
+ })
+ .run(tauri::generate_context!())
+ .expect("error al ejecutar la aplicación tauri");
+ }
+ ```
+
+ 3. Puedes instalar los enlaces de JavaScript Guest utilizando tu gestor de paquetes de JavaScript preferido:
+
+
+
+
+
+
+
+
+## Uso
+
+El plugin de autostart está disponible tanto en JavaScript como en Rust.
+
+
+
+
+```javascript
+import { enable, isEnabled, disable } from '@tauri-apps/plugin-autostart';
+// si utilizas `"withGlobalTauri": true`, deberías usar
+// const { enable, isEnabled, disable } = window.__TAURI__.autostart;
+
+// Activar el arranque automático
+await enable();
+// Comprobar el estado de activación
+console.log(`registered for autostart? ${await isEnabled()}`);
+// Desactivar el arranque automático
+disable();
+```
+
+
+
+
+```rust
+#[cfg_attr(mobile, tauri::mobile_entry_point)]
+pub fn run() {
+ tauri::Builder::default()
+ .setup(|app| {
+ #[cfg(desktop)]
+ {
+ use tauri_plugin_autostart::MacosLauncher;
+ use tauri_plugin_autostart::ManagerExt;
+
+ app.handle().plugin(tauri_plugin_autostart::init(
+ MacosLauncher::LaunchAgent,
+ Some(vec!["--flag1", "--flag2"]),
+ ));
+
+ // Obtener el gestor de arranque automático
+ let autostart_manager = app.autolaunch();
+ // Activar el arranque automático
+ let _ = autostart_manager.enable();
+ // Comprobar el estado de activación
+ println!("registered for autostart? {}", autostart_manager.is_enabled().unwrap());
+ // Desactivar el arranque automático
+ let _ = autostart_manager.disable();
+ }
+ Ok(())
+ })
+ .run(tauri::generate_context!())
+ .expect("error al ejecutar la aplicación tauri");
+}
+```
+
+
+
+
+## Permisos
+
+Por defecto, todos los comandos y ámbitos de plugin potencialmente peligrosos están bloqueados y no se pueden acceder. Debes modificar los permisos en tu configuración de `capabilities` para habilitar estos.
+
+Consulta la [Descripción general de capacidades](/es/security/capabilities/) para obtener más información y la [guía paso a paso](/es/learn/security/using-plugin-permissions/) para utilizar los permisos de plugin.
+
+```json title="src-tauri/capabilities/default.json"
+{
+ "permissions": [
+ ...,
+ "autostart:allow-enable",
+ "autostart:allow-disable",
+ "autostart:allow-is-enabled"
+ ]
+}
+```
+
+
diff --git a/src/content/docs/es/plugin/barcode-scanner.mdx b/src/content/docs/es/plugin/barcode-scanner.mdx
new file mode 100644
index 0000000000..4839bc4073
--- /dev/null
+++ b/src/content/docs/es/plugin/barcode-scanner.mdx
@@ -0,0 +1,136 @@
+---
+title: Escáner de códigos de barras
+description: Permite que tu aplicación móvil utilice la cámara para escanear códigos QR, EAN-13 y otros tipos de códigos de barras.
+sidebar:
+ badge:
+ text: Nuevo
+ variant: tip
+plugin: barcode-scanner
+i18nReady: true
+---
+
+import PluginLinks from '@components/PluginLinks.astro';
+import Compatibility from '@components/plugins/Compatibility.astro';
+
+import { Tabs, TabItem, Steps } from '@astrojs/starlight/components';
+import CommandTabs from '@components/CommandTabs.astro';
+import PluginPermissions from '@components/PluginPermissions.astro';
+
+
+
+Permite que tu aplicación móvil utilice la cámara para escanear códigos QR, EAN-13 y otros tipos de códigos de barras.
+
+## Plataformas compatibles
+
+
+
+## Instalación
+
+Instala el plugin de escáner de códigos de barras para comenzar.
+
+
+
+
+ Usa el gestor de paquetes de tu proyecto para añadir la dependencia:
+
+ {' '}
+
+
+
+
+
+
+
+ 1. Ejecuta el siguiente comando en la carpeta `src-tauri` para añadir el plugin a las dependencias del proyecto en `Cargo.toml`:
+
+ ```sh frame=none
+ cargo add tauri-plugin-barcode-scanner --target 'cfg(any(target_os = "android", target_os = "ios"))'
+ ```
+
+ 2. Modifica `lib.rs` para inicializar el plugin:
+
+ ```rust title="src-tauri/src/lib.rs" ins={5-6}
+ #[cfg_attr(mobile, tauri::mobile_entry_point)]
+ pub fn run() {
+ tauri::Builder::default()
+ .setup(|app| {
+ #[cfg(mobile)]
+ app.handle().plugin(tauri_plugin_barcode_scanner::init());
+ Ok(())
+ })
+ .run(tauri::generate_context!())
+ .expect("error al ejecutar la aplicación tauri");
+ }
+ ```
+
+ 3. Instala los enlaces de JavaScript Guest utilizando tu gestor de paquetes de JavaScript preferido:
+
+
+
+
+
+
+
+
+## Configuración
+
+En iOS, el plugin de escáner de códigos de barras requiere el valor de la propiedad de lista de información `NSCameraUsageDescription`, que debe describir por qué tu aplicación necesita utilizar la cámara.
+
+En el archivo `src-tauri/Info.ios.plist`, añade el siguiente fragmento:
+
+```xml title=src-tauri/Info.ios.plist
+
+
+
+
+ NSCameraUsageDescription
+ Leer códigos QR
+
+
+```
+
+## Uso
+
+El plugin de escáner de códigos de barras está disponible en JavaScript.
+
+```javascript
+import { scan, Format } from '@tauri-apps/plugin-barcode-scanner';
+// cuando uses `"withGlobalTauri": true`, deberías usar
+// const { scan, Format } = window.__TAURI__.barcodeScanner;
+
+// `windowed: true` en realidad establece la vista web en transparente
+// en lugar de abrir una vista separada para la cámara
+// asegúrate de que tu interfaz de usuario esté lista para mostrar lo que hay debajo con un elemento transparente
+scan({ windowed: true, formats: [Format.QRCode] });
+```
+
+## Permisos
+
+Por defecto, todos los comandos y ámbitos de plugin potencialmente peligrosos están bloqueados y no se pueden acceder. Debes modificar los permisos en tu configuración de `capabilities` para habilitar estos.
+
+Consulta la [Descripción general de capacidades](/es/security/capabilities/) para obtener más información y la [guía paso a paso](/es/learn/security/using-plugin-permissions/) para utilizar los permisos de plugin.
+
+```json title="src-tauri/capabilities/mobile.json"
+{
+ "$schema": "../gen/schemas/mobile-schema.json",
+ "identifier": "mobile-capability",
+ "windows": ["main"],
+ "platforms": ["iOS", "android"],
+ "permissions": ["barcode-scanner:allow-scan", "barcode-scanner:allow-cancel"]
+}
+```
+
+
diff --git a/src/content/docs/es/plugin/clipboard.mdx b/src/content/docs/es/plugin/clipboard.mdx
new file mode 100644
index 0000000000..53b9cc15c5
--- /dev/null
+++ b/src/content/docs/es/plugin/clipboard.mdx
@@ -0,0 +1,119 @@
+---
+title: Portapapeles
+description: Lee y escribe en el portapapeles del sistema.
+plugin: clipboard-manager
+i18nReady: true
+---
+
+import Stub from '@components/Stub.astro';
+import PluginLinks from '@components/PluginLinks.astro';
+import Compatibility from '@components/plugins/Compatibility.astro';
+
+import { Tabs, TabItem, Steps } from '@astrojs/starlight/components';
+import CommandTabs from '@components/CommandTabs.astro';
+import PluginPermissions from '@components/PluginPermissions.astro';
+
+
+
+Lee y escribe en el portapapeles del sistema utilizando el plugin de portapapeles.
+
+## Plataformas compatibles
+
+
+
+## Configuración
+
+Instala el plugin de portapapeles para comenzar.
+
+
+
+
+ Usa el gestor de paquetes de tu proyecto para añadir la dependencia:
+
+
+
+
+
+
+
+ 1. Ejecuta el siguiente comando en la carpeta `src-tauri` para añadir el plugin a las dependencias del proyecto en `Cargo.toml`:
+
+ ```sh frame=none
+ cargo add tauri-plugin-clipboard-manager
+ ```
+
+ 2. Modifica `lib.rs` para inicializar el plugin:
+
+ ```rust title="src-tauri/src/lib.rs" ins={4}
+ #[cfg_attr(mobile, tauri::mobile_entry_point)]
+ pub fn run() {
+ tauri::Builder::default()
+ .plugin(tauri_plugin_clipboard_manager::init())
+ .run(tauri::generate_context!())
+ .expect("error al ejecutar la aplicación tauri");
+ }
+ ```
+
+ 3. Si deseas gestionar el portapapeles en JavaScript, también debes instalar el paquete de npm:
+
+
+
+
+
+
+
+
+## Uso
+
+{/* TODO: Link to which language to use, frontend vs. backend guide when it's made */}
+
+El plugin de portapapeles está disponible tanto en JavaScript como en Rust.
+
+
+
+
+```javascript
+import { writeText, readText } from '@tauri-apps/plugin-clipboard-manager';
+// cuando uses `"withGlobalTauri": true`, deberías usar
+// const { writeText, readText } = window.__TAURI__.clipboardManager;
+
+// Escribe contenido al portapapeles
+await writeText('¡Tauri es increíble!');
+
+// Leer contenido del portapapeles
+const content = await readText();
+console.log(content);
+// Imprime "¡Tauri es increíble!" en la consola
+```
+
+
+
+
+```rust
+use tauri_plugin_clipboard_manager::ClipboardExt;
+
+app.clipboard().write_text("¡Tauri es increíble!".to_string()).unwrap();
+
+// Leer contenido del portapapeles
+let content = app.clipboard().read_text();
+println!("{:?}", content.unwrap());
+// Muestra "¡Tauri es increíble!" en la terminal
+
+
+```
+
+
+
+
+
diff --git a/src/content/docs/es/plugin/localhost.mdx b/src/content/docs/es/plugin/localhost.mdx
new file mode 100644
index 0000000000..4cb91cf2b3
--- /dev/null
+++ b/src/content/docs/es/plugin/localhost.mdx
@@ -0,0 +1,92 @@
+---
+title: Localhost
+description: Usa un servidor localhost en aplicaciones en producción.
+plugin: localhost
+i18nReady: true
+---
+
+import PluginLinks from '@components/PluginLinks.astro';
+import Compatibility from '@components/plugins/Compatibility.astro';
+
+import { Tabs, TabItem, Steps } from '@astrojs/starlight/components';
+import CommandTabs from '@components/CommandTabs.astro';
+
+
+
+Expone los recursos de tu aplicación a través de un servidor localhost en lugar de usar el protocolo personalizado por defecto.
+
+:::caution
+Este plugin conlleva riesgos de seguridad considerables y solo debes usarlo si sabes lo que estás haciendo. Si tienes dudas, utiliza la implementación del protocolo personalizado por defecto.
+:::
+
+## Plataformas compatibles
+
+
+
+## Configuración
+
+Instala el plugin localhost para comenzar.
+
+
+
+
+ Usa el gestor de paquetes de tu proyecto para añadir la dependencia:
+
+
+
+
+
+
+
+
+ 1. Ejecuta el siguiente comando en la carpeta `src-tauri` para añadir el plugin a las dependencias del proyecto en `Cargo.toml`:
+
+ ```sh frame=none
+ cargo add tauri-plugin-localhost
+ ```
+
+ 2. Modifica `lib.rs` para inicializar el plugin:
+
+ ```rust title="src-tauri/src/lib.rs" ins={4}
+ #[cfg_attr(mobile, tauri::mobile_entry_point)]
+ pub fn run() {
+ tauri::Builder::default()
+ .plugin(tauri_plugin_localhost::Builder::new().build())
+ .run(tauri::generate_context!())
+ .expect("error al ejecutar la aplicación tauri");
+ }
+ ```
+
+
+
+
+
+
+## Uso
+
+El plugin localhost está disponible en Rust.
+
+```rust title="src-tauri/src/lib.rs" {4} {7-14}
+use tauri::{webview::WebviewWindowBuilder, WebviewUrl};
+
+pub fn run() {
+ let port: u16 = 9527;
+
+ tauri::Builder::default()
+ .plugin(tauri_plugin_localhost::Builder::new(port).build())
+ .setup(move |app| {
+ let url = format!("http://localhost:{}", port).parse().unwrap();
+ WebviewWindowBuilder::new(app, "main".to_string(), WebviewUrl::External(url))
+ .title("Ejemplo de Localhost")
+ .build()?;
+ Ok(())
+ })
+ .run(tauri::generate_context!())
+ .expect("error al ejecutar la aplicación tauri");
+}
+```
diff --git a/src/content/docs/es/plugin/notification.mdx b/src/content/docs/es/plugin/notification.mdx
new file mode 100644
index 0000000000..bdbd3f43af
--- /dev/null
+++ b/src/content/docs/es/plugin/notification.mdx
@@ -0,0 +1,319 @@
+---
+title: Notificaciones
+description: Envía notificaciones nativas al usuario.
+i18nReady: true
+plugin: notification
+---
+
+import PluginLinks from '@components/PluginLinks.astro';
+import Compatibility from '@components/plugins/Compatibility.astro';
+import PluginPermissions from '@components/PluginPermissions.astro';
+import { Tabs, TabItem, Steps } from '@astrojs/starlight/components';
+import CommandTabs from '@components/CommandTabs.astro';
+
+
+
+Envía notificaciones nativas al usuario utilizando el plugin de notificaciones.
+
+## Plataformas soportadas
+
+
+
+## Configuración
+
+Instala el plugin de notificaciones para comenzar.
+
+
+
+
+ Utiliza el gestor de paquetes de tu proyecto para añadir la dependencia:
+
+
+
+
+
+
+
+
+ 1. Ejecuta el siguiente comando en el directorio `src-tauri` para añadir el plugin a las dependencias del proyecto en `Cargo.toml`:
+
+ ```sh frame=none
+ cargo add tauri-plugin-notification
+ ```
+
+ 2. Modifica `lib.rs` para inicializar el plugin:
+
+ ```rust title="src-tauri/src/lib.rs" ins={4}
+ #[cfg_attr(mobile, tauri::mobile_entry_point)]
+ pub fn run() {
+ tauri::Builder::default()
+ .plugin(tauri_plugin_notification::init())
+ .run(tauri::generate_context!())
+ .expect("error while running tauri application");
+ }
+ ```
+
+ 3. Si deseas utilizar notificaciones desde JavaScript, instala también el paquete npm:
+
+
+
+
+
+
+
+
+
+## Uso
+
+Aquí hay algunos ejemplos de cómo usar el plugin de notificaciones:
+
+- [Enviar notificaciones a los usuarios](#enviar-notificación)
+- [Añadir una acción a una notificación](#actions)
+- [Añadir un adjunto a una notificación](#adjuntos)
+- [Enviar una notificación a un canal específico](#canales)
+
+El plugin de notificaciones está disponible tanto en JavaScript como en Rust.
+
+### Enviar notificación
+
+Sigue estos pasos para enviar una notificación:
+
+
+1. Comprueba si se ha concedido el permiso
+
+2. Solicita permiso si no se ha concedido
+
+3. Envía la notificación
+
+
+
+
+
+
+```javascript
+import {
+ isPermissionGranted,
+ requestPermission,
+ sendNotification,
+} from '@tauri-apps/plugin-notification';
+// si se usa `"withGlobalTauri": true`, puedes hacer
+// const { isPermissionGranted, requestPermission, sendNotification, } = window.__TAURI__.notification;
+
+// Tienes permiso para enviar una notificación?
+let permissionGranted = await isPermissionGranted();
+
+// Si no es así, necesitamos solicitarlo
+if (!permissionGranted) {
+ const permission = await requestPermission();
+ permissionGranted = permission === 'granted';
+}
+
+// Una vez que se concede el permiso, envía la notificación
+if (permissionGranted) {
+ sendNotification({ title: 'Tauri', body: 'Tauri is awesome!' });
+}
+```
+
+
+
+
+```rust
+tauri::Builder::default()
+ .plugin(tauri_plugin_notification::init())
+ .setup(|app| {
+ use tauri_plugin_notification::NotificationExt;
+ app.notification()
+ .builder()
+ .title("Tauri")
+ .body("Tauri es genial")
+ .show()
+ .unwrap();
+
+ Ok(())
+ })
+ .run(tauri::generate_context!())
+ .expect("error mientras se ejecutaba la aplicación tauri");
+```
+
+
+
+
+### Actions
+
+:::caution[Mobile Only]
+La API de Actions solo está disponible en plataformas móviles.
+:::
+
+Las acciones añaden botones e inputs interactivos a las notificaciones. Úsalas para crear una experiencia interactiva para tus usuarios.
+
+#### Registrar tipos de acciones
+
+Registra tipos de acciones para definir elementos interactivos:
+
+```javascript
+import { registerActionTypes } from '@tauri-apps/plugin-notification';
+
+await registerActionTypes([
+ {
+ id: 'messages',
+ actions: [
+ {
+ id: 'reply',
+ title: 'Responder',
+ input: true,
+ inputButtonTitle: 'Enviar',
+ inputPlaceholder: 'Escribe tu respuesta...',
+ },
+ {
+ id: 'mark-read',
+ title: 'Marcar como leído',
+ foreground: false,
+ },
+ ],
+ },
+]);
+```
+
+#### Propiedades de las acciones
+
+| Propiedad | Descripción |
+| ------------------------ | ------------------------------------------------------ |
+| `id` | Identificador único de la acción |
+| `title` | Texto a mostrar en la acción del botón |
+| `requiresAuthentication` | Requiere autenticación en el dispositivo |
+| `foreground` | Pone la aplicación en primer plano cuando es accionada |
+| `destructive` | Muestra la acción en rojo en iOS |
+| `input` | Habilita el campo de texto |
+| `inputButtonTitle` | Texto para el botón para enviar el input |
+| `inputPlaceholder` | Texto de ejemplo en el campo de texto |
+
+#### Suscribirse a acciones
+
+Suscribirse a notificaciones con acciones:
+
+```javascript
+import { onAction } from '@tauri-apps/plugin-notification';
+
+await onAction((notification) => {
+ console.log('Acción realizada:', notification);
+});
+```
+
+### Adjuntos
+
+Los adjuntos añaden contenido multimedia a las notificaciones. El soporte varía según la plataforma.
+
+```javascript
+import { sendNotification } from '@tauri-apps/plugin-notification';
+
+sendNotification({
+ title: 'Nueva imagen',
+ body: 'Mira esta imagen',
+ attachments: [
+ {
+ id: 'image-1',
+ url: 'asset:///notification-image.jpg',
+ },
+ ],
+});
+```
+
+#### Propiedades de los adjuntos
+
+| Propiedad | Descripción |
+| --------- | ---------------------------------------------------------- |
+| `id` | Identificador único |
+| `url` | URL del contenido usando los protocolos asset:// o file:// |
+
+Nota: Prueba los adjuntos en tus plataformas que quieras soportar para asegurarte de su compatibilidad.
+
+### Canales
+
+Los canales organizan las notificaciones en categorías con diferentes comportamientos. Aunque se usan principalmente en Android, proporcionan una API consistente en todas las plataformas.
+
+#### Crear un canal
+
+```javascript
+import {
+ createChannel,
+ Importance,
+ Visibility,
+} from '@tauri-apps/plugin-notification';
+
+await createChannel({
+ id: 'messages',
+ name: 'Mensajes',
+ description: 'Notificaciones para nuevos mensajes',
+ importance: Importance.High,
+ visibility: Visibility.Private,
+ lights: true,
+ lightColor: '#ff0000',
+ vibration: true,
+ sound: 'notification_sound',
+});
+```
+
+#### Propiedades de los canales
+
+| Propiedad | Descripción |
+| ------------- | -------------------------------------------------- |
+| `id` | Identificador único |
+| `name` | Nombre a mostrar |
+| `description` | Propósito del canal |
+| `importance` | Nivel de prioridad (None, Min, Low, Default, High) |
+| `visibility` | Nivel de privacidad (Secret, Private, Public) |
+| `lights` | Habilitar indicador LED (Android) |
+| `lightColor` | Color del indicador LED (Android) |
+| `vibration` | Habilitar vibraciones |
+| `sound` | Nombre del fichero para sonido personalizado |
+
+#### Gestionar canales
+
+Listar canales existentes:
+
+```javascript
+import { channels } from '@tauri-apps/plugin-notification';
+
+const existingChannels = await channels();
+```
+
+Eliminar un canal:
+
+```javascript
+import { removeChannel } from '@tauri-apps/plugin-notification';
+
+await removeChannel('messages');
+```
+
+#### Usando canales
+
+Enviar una notificación usando un canal:
+
+```javascript
+import { sendNotification } from '@tauri-apps/plugin-notification';
+
+sendNotification({
+ title: 'Nuevo mensaje',
+ body: 'Tienes un nuevo mensaje',
+ channelId: 'messages',
+});
+```
+
+Nota: Crea canales antes de enviar notificaciones que los referencien. Los identificadores de canal inválidos impiden que las notificaciones se muestren.
+
+## Consideraciones de seguridad
+
+Aparte de los procedimientos normales de sanitización de la entrada del usuario, actualmente no hay consideraciones de seguridad conocidas.
+
+
diff --git a/src/content/docs/es/start/frontend/nextjs.mdx b/src/content/docs/es/start/frontend/nextjs.mdx
index 43969fe697..ff0d9f7f1e 100644
--- a/src/content/docs/es/start/frontend/nextjs.mdx
+++ b/src/content/docs/es/start/frontend/nextjs.mdx
@@ -1,90 +1,131 @@
---
title: Next.js
i18nReady: true
+tableOfContents:
+ collapseLevel: 1
+ minHeadingLevel: 2
+ maxHeadingLevel: 5
---
-import { Tabs, TabItem } from '@astrojs/starlight/components';
+import { Tabs, TabItem, Steps } from '@astrojs/starlight/components';
import CommandTabs from '@components/CommandTabs.astro';
-Next.js es un framework para React. Aprende más sobre Next.js en https://nextjs.org. Esta guía es precisa a partir de Next.js 13.4.19.
+Next.js es un meta framework para React. Aprende más sobre Next.js en https://nextjs.org. Esta guía es válida para Next.js 14.2.3.
## Checklist
- Usa exports estáticos estableciendo `output: 'export'`. Tauri no soporta soluciones basadas en el servidor.
-- Usa `out/` como `distDir` en `tauri.conf.json`.
+- Usa el directorio `out` como `frontendDist` en `tauri.conf.json`.
## Ejemplo de Configuración
-1. Actualiza la configuración de Tauri:
-
-
-
-
-```json
-// tauri.conf.json
-{
- "build": {
- "beforeDevCommand": "npm run dev",
- "beforeBuildCommand": "npm run build",
- "devPath": "http://localhost:3000",
- "distDir": "../dist"
- }
-}
-```
-
-
-
-
-```json
-// tauri.conf.json
-{
- "build": {
- "beforeDevCommand": "yarn dev",
- "beforeBuildCommand": "yarn generate",
- "devPath": "http://localhost:3000",
- "distDir": "../dist"
- }
-}
-```
-
-
-
-
-```json
-// tauri.conf.json
-{
- "build": {
- "beforeDevCommand": "pnpm dev",
- "beforeBuildCommand": "pnpm generate",
- "devPath": "http://localhost:3000",
- "distDir": "../dist"
- }
-}
-```
-
-
-
-
-2. Actualiza la configuración de Next.js:
-
-```ts
-// next.conf.ts
-const isProd = process.env.NODE_ENV === 'production';
-module.exports = async (phase, { defaultConfig }) => {
- // En modo de desarrollo usamos TAURI_DEV_HOST para servir los archivos si es necesario
- const internalHost = process.env.TAURI_DEV_HOST || 'localhost';
- const nextConfig = {
- // Aségurate de que Next.js use SSG en lugar de SSR
- // https://nextjs.org/docs/pages/building-your-application/deploying/static-exports
- output: 'export',
- // Nota: Esta función experimental es necesaria para usar NextJS Image en modo SSG.
- // Consulta https://nextjs.org/docs/messages/export-image-api para ver diferentes soluciones.
- images: {
- unoptimized: true,
- },
- // Configura assetPrefix o el servidor no resolverá correctamente tus archivos.
- assetPrefix: isProd ? null : `http://${internalHost}:3000`,
- };
- return nextConfig;
-};
-```
+
+
+1. ##### Actualiza la configuración de Tauri
+
+
+
+
+
+ ```json
+ // src-tauri/tauri.conf.json
+ {
+ "build": {
+ "beforeDevCommand": "npm run dev",
+ "beforeBuildCommand": "npm run build",
+ "devUrl": "http://localhost:3000",
+ "frontendDist": "../out"
+ }
+ }
+ ```
+
+
+
+
+
+ ```json
+ // src-tauri/tauri.conf.json
+ {
+ "build": {
+ "beforeDevCommand": "yarn dev",
+ "beforeBuildCommand": "yarn build",
+ "devUrl": "http://localhost:3000",
+ "frontendDist": "../out"
+ }
+ }
+ ```
+
+
+
+
+
+ ```json
+ // src-tauri/tauri.conf.json
+ {
+ "build": {
+ "beforeDevCommand": "pnpm dev",
+ "beforeBuildCommand": "pnpm build",
+ "devUrl": "http://localhost:3000",
+ "frontendDist": "../out"
+ }
+ }
+ ```
+
+
+
+
+
+ ```json
+ // src-tauri/tauri.conf.json
+ {
+ "build": {
+ "beforeDevCommand": "deno task dev",
+ "beforeBuildCommand": "deno task build",
+ "devUrl": "http://localhost:3000",
+ "frontendDist": "../out"
+ }
+ }
+ ```
+
+
+
+
+
+2. ##### Actualiza la configuración de Next.js
+
+ ```ts
+ // next.conf.mjs
+ const isProd = process.env.NODE_ENV === 'production';
+
+ const internalHost = process.env.TAURI_DEV_HOST || 'localhost';
+
+ /** @type {import('next').NextConfig} */
+ const nextConfig = {
+ // Asegurate de que Next.js usa SSG en lugar de SSR
+ // https://nextjs.org/docs/pages/building-your-application/deploying/static-exports
+ output: 'export',
+ // Nota: Esta función es necesaria para usar el componente Image de Next.js en modo SSG.
+ // Consulta https://nextjs.org/docs/messages/export-image-api para ver algunas soluciones alternativas.
+ images: {
+ unoptimized: true,
+ },
+ // Configura assetPrefix; de lo contrario, el servidor no resolverá correctamente tus recursos.
+ assetPrefix: isProd ? undefined : `http://${internalHost}:3000`,
+ };
+
+ export default nextConfig;
+ ```
+
+3. ##### Actualiza la configuración de package.json
+
+ ```json
+ "scripts": {
+ "dev": "next dev",
+ "build": "next build",
+ "start": "next start",
+ "lint": "next lint",
+ "tauri": "tauri"
+ }
+ ```
+
+
diff --git a/src/content/docs/es/start/frontend/nuxt.mdx b/src/content/docs/es/start/frontend/nuxt.mdx
index a3a4b0c7f0..88dd828b3a 100644
--- a/src/content/docs/es/start/frontend/nuxt.mdx
+++ b/src/content/docs/es/start/frontend/nuxt.mdx
@@ -1,102 +1,117 @@
---
title: Nuxt
i18nReady: true
+tableOfContents:
+ minHeadingLevel: 2
+ maxHeadingLevel: 5
---
-import { Tabs, TabItem } from '@astrojs/starlight/components';
+import { Tabs, TabItem, Steps } from '@astrojs/starlight/components';
-Aprende más sobre Nuxt en https://nuxt.com. Esta guía es precisa a partir de Nuxt 3.7.
+Nuxt es un meta framework para Vue. Aprende más sobre Nuxt en https://nuxt.com. Esta guía es válida para Nuxt 3.11.
## Checklist
- Usa SSG estableciendo `ssr: false`. Tauri no soporta soluciones basadas en el servidor.
-- Configura el host a `0.0.0.0`.
+- Usa `process.env.TAURI_DEV_HOST` como dirección IP del servidor de desarrollo cuando se configure para ejecutarse en dispositivos físicos con iOS.
- Usa `dist/` como `distDir` en `tauri.conf.json`.
- Compila usando `nuxi generate`.
- (Opcional): Deshabilita la telemetría estableciendo `telemetry: false` en `nuxt.config.ts`.
## Ejemplo de Configuración
-1. Actualiza la configuración de Tauri:
-
-
-
-
-```json
-// tauri.conf.json
-{
- "build": {
- "beforeDevCommand": "npm run dev",
- "beforeBuildCommand": "npm run generate",
- "devPath": "http://localhost:3000",
- "distDir": "../dist"
- }
-}
-```
-
-
-
-
-```json
-// tauri.conf.json
-{
- "build": {
- "beforeDevCommand": "yarn dev",
- "beforeBuildCommand": "yarn generate",
- "devPath": "http://localhost:3000",
- "distDir": "../dist"
- }
-}
-```
-
-
-
-
-```json
-// tauri.conf.json
-{
- "build": {
- "beforeDevCommand": "pnpm dev",
- "beforeBuildCommand": "pnpm generate",
- "devPath": "http://localhost:3000",
- "distDir": "../dist"
- }
-}
-```
-
-
-
-
-
-2. Actualiza la configuración de Nuxt:
-
-```ts
-export default defineNuxtConfig({
- // (opcional) Habilita las herramientas de desarrollo de Nuxt
- devtools: { enabled: true },
- // Habilita SSG
- ssr: false,
- vite: {
- // Mejor soporte para la salida de Tauri CLI
- clearScreen: false,
- // Habilita las variables de entorno
- // Las variables de entorno adicionales se pueden encontrar en
- // https://v2.tauri.app/reference/environment-variables/
- envPrefix: ['VITE_', 'TAURI_'],
- server: {
- // Tauri requiere un puerto consistente
- strictPort: true,
- // Habilita el servidor de desarrollo para pueda ser accedido por otros dispositivos para el desarrollo móvil
- host: '0.0.0.0',
- hmr: {
- // Usa un websocket para la recarga rápida en móviles
- protocol: 'ws',
- // Asegúrate de que esté disponible en la red
- host: '0.0.0.0',
- // Usa un puerto específico para hmr
- port: 5183,
+
+
+1. ##### Actualiza la configuración de Tauri:
+
+
+
+
+
+ ```json
+ // tauri.conf.json
+ {
+ "build": {
+ "beforeDevCommand": "npm run dev",
+ "beforeBuildCommand": "npm run generate",
+ "devUrl": "http://localhost:3000",
+ "frontendDist": "../dist"
+ }
+ }
+ ```
+
+
+
+
+ ```json
+ // tauri.conf.json
+ {
+ "build": {
+ "beforeDevCommand": "yarn dev",
+ "beforeBuildCommand": "yarn generate",
+ "devUrl": "http://localhost:3000",
+ "frontendDist": "../dist"
+ }
+ }
+ ```
+
+
+
+
+ ```json
+ // tauri.conf.json
+ {
+ "build": {
+ "beforeDevCommand": "pnpm dev",
+ "beforeBuildCommand": "pnpm generate",
+ "devUrl": "http://localhost:3000",
+ "frontendDist": "../dist"
+ }
+ }
+ ```
+
+
+
+
+ ```json
+ // tauri.conf.json
+ {
+ "build": {
+ "beforeDevCommand": "deno task dev",
+ "beforeBuildCommand": "deno task generate",
+ "devUrl": "http://localhost:3000",
+ "frontendDist": "../dist"
+ }
+ }
+ ```
+
+
+
+
+
+2. ##### Actualiza la configuración de Nuxt:
+
+ ```ts
+ export default defineNuxtConfig({
+ // (opcional) Habilita las herramientas de desarrollo de Nuxt
+ devtools: { enabled: true },
+ // Habilita SSG
+ ssr: false,
+ // Permite que el servidor de desarrollo sea detectable por otros dispositivos al ejecutarse en dispositivos físicos con iOS
+ devServer: { host: process.env.TAURI_DEV_HOST || 'localhost' },
+ vite: {
+ // Mejor soporte para la salida de Tauri CLI
+ clearScreen: false,
+ // Habilita las variables de entorno
+ // Las variables de entorno adicionales se pueden encontrar en
+ // https://v2.tauri.app/reference/environment-variables/
+ envPrefix: ['VITE_', 'TAURI_'],
+ server: {
+ // Tauri requiere un puerto consistente
+ strictPort: true,
+ },
},
- },
- },
-});
-```
+ });
+ ```
+
+
diff --git a/src/content/docs/es/start/frontend/qwik.mdx b/src/content/docs/es/start/frontend/qwik.mdx
new file mode 100644
index 0000000000..03ac887c9c
--- /dev/null
+++ b/src/content/docs/es/start/frontend/qwik.mdx
@@ -0,0 +1,142 @@
+---
+title: Qwik
+i18nReady: true
+tableOfContents:
+ minHeadingLevel: 2
+ maxHeadingLevel: 5
+---
+
+import { Steps, TabItem, Tabs } from '@astrojs/starlight/components';
+import CommandTabs from '@components/CommandTabs.astro';
+
+Esta guía te llevará paso a paso para crear aplicación Tauri usando el framework web Qwik. Aprende más sobre Qwik en https://qwik.dev.
+
+## Checklist
+
+- Usa [SSG](https://qwik.dev/docs/guides/static-site-generation/). Tauri no soporta oficialmente soluciones basadas en el servidor.
+- Usa `dist/` en lugar de `frontendDist` en `tauri.conf.json`.
+
+## Ejemplo de Configuración
+
+
+
+1. ##### Crea una nueva aplicación Qwik
+
+ `}
+ yarn={`yarn create qwik@latest
+ cd `}
+ pnpm={`pnpm create qwik@latest
+ cd `}
+ deno={`deno run -A npm:create-qwik@latest
+ cd `}
+ />
+
+1. ##### Instala el `static adapter`
+
+
+
+1. ##### Añade la CLI de Tauri a tu proyecto
+
+
+
+1. ##### Inicializa un nuevo projecto Tauri
+
+
+
+1. ##### Configura Tauri
+
+
+
+
+
+ ```json
+ // tauri.conf.json
+ {
+ "build": {
+ "devUrl": "http://localhost:5173"
+ "frontendDist": "../dist",
+ "beforeDevCommand": "npm run dev",
+ "beforeBuildCommand": "npm run build"
+ }
+ }
+ ```
+
+
+
+
+
+ ```json
+ // tauri.conf.json
+ {
+ "build": {
+ "devUrl": "http://localhost:5173"
+ "frontendDist": "../dist",
+ "beforeDevCommand": "yarn dev",
+ "beforeBuildCommand": "yarn build"
+ }
+ }
+ ```
+
+
+
+
+
+ ```json
+ // tauri.conf.json
+ {
+ "build": {
+ "devUrl": "http://localhost:5173"
+ "frontendDist": "../dist",
+ "beforeDevCommand": "pnpm dev",
+ "beforeBuildCommand": "pnpm build"
+ }
+ }
+ ```
+
+
+
+
+
+ ```json
+ // tauri.conf.json
+ {
+ "build": {
+ "devUrl": "http://localhost:5173"
+ "frontendDist": "../dist",
+ "beforeDevCommand": "deno task dev",
+ "beforeBuildCommand": "deno task build"
+ }
+ }
+ ```
+
+
+
+
+
+1. ##### Ejecuta tu aplicación `tauri`
+
+
+
+
diff --git a/src/content/docs/es/start/frontend/sveltekit.mdx b/src/content/docs/es/start/frontend/sveltekit.mdx
new file mode 100644
index 0000000000..39c17d3386
--- /dev/null
+++ b/src/content/docs/es/start/frontend/sveltekit.mdx
@@ -0,0 +1,137 @@
+---
+title: SvelteKit
+i18nReady: true
+tableOfContents:
+ minHeadingLevel: 2
+ maxHeadingLevel: 5
+---
+
+import { Tabs, TabItem, Steps } from '@astrojs/starlight/components';
+import CommandTabs from '@components/CommandTabs.astro';
+
+SvelteKit es un meta framework para Svelte. Aprende más sobre SvelteKit en https://svelte.dev/. Esta guía es válida para SvelteKit 2.5.7 y Svelte 4.2.15.
+
+## Checklist
+
+- Usa [SSG](https://svelte.dev/docs/kit/adapter-static) y/o [SPA](https://svelte.dev/docs/kit/single-page-apps) a través de `static-adapter`. Tauri no soporta oficialmente soluciones basadas en el servidor.
+- Usa `build/` en lugar de `frontendDist` en `tauri.conf.json`.
+
+## Ejemplo de Configuración
+
+
+
+1. ##### Instala `@sveltejs/adapter-static`
+
+
+
+1. ##### Actualiza la configuración de Tauri
+
+
+
+
+
+ ```json
+ // tauri.conf.json
+ {
+ "build": {
+ "beforeDevCommand": "npm run dev",
+ "beforeBuildCommand": "npm run build",
+ "devUrl": "http://localhost:5173",
+ "frontendDist": "../build"
+ }
+ }
+ ```
+
+
+
+
+
+ ```json
+ // tauri.conf.json
+ {
+ "build": {
+ "beforeDevCommand": "yarn dev",
+ "beforeBuildCommand": "yarn build",
+ "devUrl": "http://localhost:5173",
+ "frontendDist": "../build"
+ }
+ }
+ ```
+
+
+
+
+
+ ```json
+ // tauri.conf.json
+ {
+ "build": {
+ "beforeDevCommand": "pnpm dev",
+ "beforeBuildCommand": "pnpm build",
+ "devUrl": "http://localhost:5173",
+ "frontendDist": "../build"
+ }
+ }
+ ```
+
+
+
+
+
+ ```json
+ // tauri.conf.json
+ {
+ "build": {
+ "beforeDevCommand": "deno task dev",
+ "beforeBuildCommand": "deno task build",
+ "devUrl": "http://localhost:5173",
+ "frontendDist": "../build"
+ }
+ }
+ ```
+
+
+
+
+
+1. ##### Actualiza la configuración de SvelteKit:
+
+ ```js title="svelte.config.js" {1}
+ import adapter from '@sveltejs/adapter-static';
+ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
+
+ /** @type {import('@sveltejs/kit').Config} */
+ const config = {
+ // Consulta https://svelte.dev/docs/kit/integrations#preprocessors
+ // para más información sobre preprocesadores
+ preprocess: vitePreprocess(),
+
+ kit: {
+ adapter: adapter(),
+ },
+ };
+
+ export default config;
+ ```
+
+1. ##### Desactiva el SSR
+
+ Por último, necesitamos desactivar el SRR y habilitar el prerenderizado añadiendo un archivo raíz `+layout.ts` (o `+layout.js` si no estás usando TypeScript) con el siguiente contenido:
+
+ ```ts
+ // src/routes/+layout.ts
+ export const prerender = true;
+ export const ssr = false;
+ ```
+
+ Ten en cuenta que `static-adapter` no requiere desactivar el SSR para toda la aplicación, pero permite usar APIs que dependen del objeto global window (como la API de Tauri) sin necesidad de realizar [comprobaciones del lado del cliente](https://svelte.dev/docs/kit/faq#how-do-i-use-x-with-sveltekit-how-do-i-use-a-client-side-only-library-that-depends-on-document-or-window).
+
+ Además, si prefieres el modo de Aplicación de Página Única (SPA) en lugar de SSG, puedes cambiar las configuraciones del adaptador y el archivo `+layout.ts` según la [documentación del adaptador](https://svelte.dev/docs/kit/single-page-apps).
+
+
diff --git a/src/content/docs/es/start/frontend/trunk.mdx b/src/content/docs/es/start/frontend/trunk.mdx
index b8c8ea594f..31ab0a9d17 100644
--- a/src/content/docs/es/start/frontend/trunk.mdx
+++ b/src/content/docs/es/start/frontend/trunk.mdx
@@ -1,44 +1,51 @@
---
title: Trunk
i18nReady: true
+tableOfContents:
+ minHeadingLevel: 2
+ maxHeadingLevel: 5
---
-Trunk es una herramienta de empaquetado de aplicaciones web WASM para Rust. Obtén más información sobre Trunk en https://trunkrs.dev. Esta guía es precisa a partir de Trunk 0.17.5.
+import { Tabs, TabItem, Steps } from '@astrojs/starlight/components';
+
+Trunk es una herramienta de empaquetado de aplicaciones web WASM para Rust. Aprende más sobre Trunk en https://trunkrs.dev. Esta guía es válida para Trunk 0.17.5.
## Checklist
- Usa SSG, Tauri no soporta oficialmente soluciones basadas en el servidor.
-- Usa `address = "0.0.0.0"` para que el servidor web esté disponible en la red para el desarrollo móvil.
-- Usa `ws_protocol = "ws"` para que el websocket de recarga rápida pueda conectarse correctamente para el desarrollo móvil.
+- Usa `serve.ws_protocol = "ws"` para que el websocket de recarga rápida pueda conectarse correctamente para el desarrollo móvil.
- Habilita `withGlobalTauri` para asegurarte de que las APIs de Tauri están disponibles en la variable `window.__TAURI__` y pueden ser importadas usando `wasm-bindgen`.
## Ejemplo de Configuración
-1. Actualiza la configuración de Tauri:
-
-```json
-// tauri.conf.json
-{
- "build": {
- "beforeDevCommand": "trunk serve",
- "beforeBuildCommand": "trunk build",
- "devPath": "http://localhost:8080",
- "distDir": "../dist"
- },
- "app": {
- "withGlobalTauri": true
- }
-}
-```
-
-2. Actualiza la configuración de Trunk:
-
-```toml
-# Trunk.toml
-[watch]
-ignore = ["./src-tauri"]
-
-[serve]
-address = "0.0.0.0"
-ws_protocol = "ws"
-```
+
+
+1. ##### Actualiza la configuración de Tauri
+
+ ```json
+ // tauri.conf.json
+ {
+ "build": {
+ "beforeDevCommand": "trunk serve",
+ "beforeBuildCommand": "trunk build",
+ "devUrl": "http://localhost:8080",
+ "frontendDist": "../dist"
+ },
+ "app": {
+ "withGlobalTauri": true
+ }
+ }
+ ```
+
+1. ##### Actualiza la configuración de Trunk
+
+ ```toml
+ # Trunk.toml
+ [watch]
+ ignore = ["./src-tauri"]
+
+ [serve]
+ ws_protocol = "ws"
+ ```
+
+
diff --git a/src/content/docs/es/start/index.mdx b/src/content/docs/es/start/index.mdx
new file mode 100644
index 0000000000..eb5749850f
--- /dev/null
+++ b/src/content/docs/es/start/index.mdx
@@ -0,0 +1,50 @@
+---
+title: ¿Qué es Tauri?
+i18nReady: true
+sidebar:
+ order: 0
+---
+
+Tauri es un framework que sirve para crear binarios pequeños y rápidos para las principales plataformas de escritorio y móviles. Los desarrolladores pueden usar cualquier framework de frontend que compile a HTML, JavaScript y CSS para crear su experiencia de usuario, y al mismo tiempo aprovechar lenguajes como Rust, Swift y Kotlin para la lógica del backend cuando sea necesario.
+
+Empieza a construir tu aplicación con [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app) usando uno de los comandos que se encuentran abajo. Asegurate de seguir la [guía de prerrequisitos](/es/start/prerequisites/) para instalar todas las dependencias requeridas por Tauri y después mira las [guías de Configuración de Frontend](/es/start/frontend/) para ver las configuraciones recomendadas.
+
+import Cta from '../../_fragments/cta.mdx';
+
+
+
+Después de haber creado tu primera aplicación, puedes explorar las diferentes características y fórmulas de Tauri en el [Listado de Características y Fórmulas](/es/plugin/).
+
+## ¿Por qué Tauri?
+
+Tauri tiene 3 ventajas principales que los desarrolladores pueden aprovechar:
+
+- Base segura para construir aplicaciones
+- Tamaño de paquete más pequeño usando la vista web nativa del sistema
+- Flexibilidad para que los desarrolladores usen cualquier frontend y soporte para múltiples lenguajes
+
+Aprende más sobre la filosofía de Tauri en la [publicación del blog de Tauri 1.0](/blog/tauri-1-0/).
+
+### Base segura
+
+Al estar contruido en Rust, Tauri es capaz de aprovechar la memoria, hilos y tipado seguro ofrecidos por Rust. Las aplicaciones construidas en Tauri pueden obtener estos beneficios automáticamente sin la necesidad de estar desarrolladas por expertos en Rust.
+
+Además, Tauri se somete a auditorías de seguridad para sus versiones principales y secundarias. Esto no solo abarca el código en la organización de Tauri, sino que también todas las dependencias de las que Tauri depende. Por supuesto, esto no elimina todo el riesgo, pero provee de una base muy sólida para que los desarrolladores construyan sobre ella.
+
+Lee la [póliza de seguidad de Tauri](https://github.com/tauri-apps/tauri/security/policy) y el [reporte de auditoría de Tauri 2.0](https://github.com/tauri-apps/tauri/blob/dev/audits/Radically_Open_Security-v2-report.pdf).
+
+### Tamaño de aplicaciones más pequeño
+
+Las aplicaciones hechas con Tauri se aprovechan de la vista web nativa del sistema del usuario. Una aplicación de Tauri solo contiene el código y los recursos específicos para esa aplicación, sin la necesidad de tener que empaquetar un motor de navegador en cada aplicación. Esto significa que una aplicación sencilla de Tauri puede tener un tamaño menor a 600KB.
+
+Aprende más sobre como crear aplicaciones optimizadas en el [concepto de Tamaño de Aplicación](/es/concept/size/).
+
+### Arquitectura flexible
+
+Dado que Tauri usa tecnologías web, prácticamente cualquier framework de frontend es compatible con Tauri. La [guía de Configuración de Frontend](/es/start/frontend/) incluye configuraciones comunes para frameworks de frontend populares.
+
+Las conexiones entre JavaScript y Rust están disponibles para los desarrolladores usando la función `invoke` en JavaScript, mientras que los enlaces para Swift y Kotlin están disponibles para [los Plugins de Tauri](/es/develop/plugins/).
+
+[TAO](https://github.com/tauri-apps/tao) se encarga de la creación de ventanas en Tauri y [WRY](https://github.com/tauri-apps/wry) de la renderización web. Ambas librerías son mantenidas por Tauri y pueden ser utilizadas directamente si se requiere un nivel más profundo de integración al que Tauri expone.
+
+Además, Tauri mantiene varios plugins para ampliar las funcionalidades que ofrece el núcleo de Tauri. Puedes encontrar estos plugins junto con los proporcionados por la comunidad en la [sección de Plugins](/es/plugin/).
diff --git a/src/content/docs/es/start/migrate/from-tauri-1.mdx b/src/content/docs/es/start/migrate/from-tauri-1.mdx
index 8eecd5db01..f19ebf752e 100644
--- a/src/content/docs/es/start/migrate/from-tauri-1.mdx
+++ b/src/content/docs/es/start/migrate/from-tauri-1.mdx
@@ -2,7 +2,7 @@
title: Actualizar desde Tauri 1.0
i18nReady: true
sidebar:
- order: 12
+ order: 15
---
import { Tabs, TabItem } from '@astrojs/starlight/components';
@@ -10,7 +10,7 @@ import CommandTabs from '@components/CommandTabs.astro';
Esta guía te guiará a través de la actualización de tu aplicación Tauri 1.0 a Tauri 2.0.
-## Preparándose para móvil
+## Preparación para móvil
La interfaz móvil de Tauri requiere que tu proyecto produzca una biblioteca compartida. Si estás apuntando a móviles para tu aplicación existente, debes cambiar tu crate para producir ese tipo de artefacto junto con el ejecutable de escritorio.
@@ -63,8 +63,6 @@ La CLI de Tauri v2 incluye un comando `migrate` que automatiza la mayor parte de
cargo tauri migrate'
/>
-{/* TODO: 2.0 */}
-
Para saber más sobre el comando `migrate`, consulta la [Referencia de la interfaz de línea de comandos](/reference/cli/#migrate)
## Resumen de los cambios
@@ -74,6 +72,7 @@ A continuación se resumen los cambios de Tauri 1.0 a Tauri 2.0:
### Configuración de Tauri
- Los campos `package > productName` y `package > version` se han trasladado al campo de nivel superior.
+- el nombre del binario ya no se renombra automáticamente para coincidir con `productName`, por lo que debes agregar una string `mainBinaryName` en el objeto de nivel superior que coincida con `productName`.
- `package` eliminado.
- La clave `tauri` ha pasado a ser `app`.
- `tauri > allowlist` eliminado. Véase [Migrar permisos](#migrar-permisos).
@@ -83,15 +82,19 @@ A continuación se resumen los cambios de Tauri 1.0 a Tauri 2.0:
- `tauri > updater > active` eliminado.
- `tauri > updater > dialog` eliminado.
- `tauri > updater` movido a `plugins > updater`.
+- Se ha agragado `bundle > createUpdaterArtifacts`, debe ser configurado al usar el actualizador de la aplicación.
+ - configúralo a `v1Compatible` cuando actualices desde aplicaciones de la V1 que ya habían sido distribuidas. Consulta la [guía del actualizador](/es/plugin/updater/) para más información.
- `tauri > systemTray` renombrado a `app > trayIcon`.
- `tauri > pattern` movido a `app > security > pattern`.
- `tauri > bundle` movido a nivel superior.
+- `tauri > bundle > identifier` movido a objeto del nivel superior.
- `tauri > bundle > dmg` movido a `bundle > macOS > dmg`
- `tauri > bundle > deb` movido a `bundle > linux > deb`
- `tauri > bundle > appimage` movido a `bundle > linux > appimage`
- `tauri > bundle > macOS > license` eliminado, utiliza `bundle > licenseFile` en su lugar.
- `tauri > bundle > windows > wix > license` eliminado, utiliza `bundle > licenseFile` en su lugar.
- `tauri > bundle > windows > nsis > license` eliminado, utiliza `bundle > licenseFile` en su lugar.
+- `tauri > bundle > windows > webviewFixedRuntimePath` eliminado, utiliza `bundle > windows > webviewInstallMode` en su lugar.
- `build > withGlobalTauri` movido a `app > withGlobalTauri`.
- `build > distDir` renombrado a `frontendDist`.
- `build > devPath` renombrado a `devUrl`.
@@ -132,7 +135,6 @@ A continuación se resumen los cambios de Tauri 1.0 a Tauri 2.0:
- El método `Plugin::setup_with_config` ha sido eliminado. Utiliza el actualizado `tauri::Plugin::PluginApi` en su lugar.
- Los métodos `scope::ipc::RemoteDomainAccessScope::enable_tauri_api` y `scope::ipc::RemoteDomainAccessScope::enables_tauri_api` han sido eliminados. Habilita cada plugin del núcleo individualmente mediante `scope::ipc::RemoteDomainAccessScope::add_plugin` en su lugar.
- El módulo `scope::IpcScope` ha sido eliminado, utiliza `scope::ipc::Scope` en su lugar.
-- El módulo `scope::IpcScope` ha sido eliminado, utiliza `scope::ipc::Scope` en su lugar.
- Los módulos `scope::FsScope`, `scope::GlobPattern` y `scope::FsScopeEvent` han sido eliminados, utiliza `scope::fs::Scope`, `scope::fs::Pattern` y `scope::fs::Event` respectivamente.
- El módulo `updater` ha sido eliminado. Utiliza `tauri-plugin-updater` en su lugar. [Migración](#migrar-al-plugin-de-actualizaciones)
- El campo `Env.args` ha sido eliminado, utiliza el campo `Env.args_os` en su lugar.
@@ -157,6 +159,8 @@ El paquete `@tauri-apps/api` ya no proporciona módulos no centrales. Sólo se e
- El módulo `@tauri-apps/api/updater` ha sido eliminado. Utiliza `@tauri-apps/plugin-updater` en su lugar. [Migración](#migrar-al-plugin-de-actualizaciones)
- El módulo `@tauri-apps/api/window` ha sido renombrado a `@tauri-apps/api/webviewWindow`. [Migración](#migrar-a-la-nueva-api-de-ventanas)
+Los plugins the la V1 ahora están publicados como `@tauri-apps/plugin-`. Anteriormente, estaban disponibles desde git como `tauri-plugin--api`.
+
### Cambios en las variables de entorno
La mayoría de las variables de entorno leídas y escritas por el CLI de Tauri fueron renombradas por consistencia y prevención de errores:
@@ -193,6 +197,10 @@ Para admitirlo, renombramos el tipo de ventana Rust `Window` a `WebviewWindow` y
El tipo de API JS `WebviewWindow` ahora se reexporta desde `@tauri-apps/api/webviewWindow` en lugar de `@tauri-apps/api/window`.
+### Nueva URL de origen en Windows
+
+On Windows the frontend files in production apps are now hosted on `http://tauri.localhost` instead of `https://tauri.localhost`. Because of this IndexedDB, LocalStorage and Cookies will be reset unless `dangerousUseHttpScheme` was used in v1. To prevent this you can set `app > windows > useHttpsScheme` to `true` or use `WebviewWindowBuilder::use_https_scheme` to keep using the `https` scheme.
+
## Pasos Detallados de Migración
Escenarios comunes que puedes encontrar al migrar tu aplicación de Tauri 1.0 a Tauri 2.0.
@@ -566,7 +574,7 @@ tauri::Builder::default()
})
```
-El plugin HTTP reexporta [reqwest](https://docs.rs/reqwest/latest/reqwest/) para que puedas consultar su documentación para obtener más información.
+El plugin HTTP reexporta [reqwest](https://docs.rs/reqwest/latest/reqwest/) así que puedes consultar su documentación para obtener más información.
@@ -1007,7 +1015,7 @@ Consulta [TrayIconBuilder](https://docs.rs/tauri/2.0.0/tauri/tray/struct.TrayIco
#### Migrar a Menú
-Utiliza `tauri::menu::Menu` en lugar de `tauri::SystemTrayMenu`, `tauri::menu::Submenu` en lugar de `tauri::SystemTraySubmenu`, y `tauri::menu::PredefinedMenuItem` en lugar de `tauri::SystemTrayMenuItem`. [Migración](#migrar-a-menú)
+Utiliza `tauri::menu::Menu` en lugar de `tauri::SystemTrayMenu`, `tauri::menu::Submenu` en lugar de `tauri::SystemTraySubmenu`, y `tauri::menu::PredefinedMenuItem` en lugar de `tauri::SystemTrayMenuItem`.
#### Eventos de Bandeja
@@ -1016,7 +1024,7 @@ Utiliza `tauri::menu::Menu` en lugar de `tauri::SystemTrayMenu`, `tauri::menu::S
```rust
use tauri::{
menu::{MenuBuilder, MenuItemBuilder},
- tray::{ClickType, TrayIconBuilder},
+ tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent},
};
tauri::Builder::default()
@@ -1032,11 +1040,17 @@ tauri::Builder::default()
_ => (),
})
.on_tray_icon_event(|tray, event| {
- if event.click_type == ClickType::Left {
+ if let TrayIconEvent::Click {
+ button: MouseButton::Left,
+ button_state: MouseButtonState::Up,
+ ..
+ } = event
+ {
let app = tray.app_handle();
if let Some(webview_window) = app.get_webview_window("main") {
- let _ = webview_window.show();
- let _ = webview_window.set_focus();
+ let _ = webview_window.unminimize();
+ let _ = webview_window.show();
+ let _ = webview_window.set_focus();
}
}
})
@@ -1086,10 +1100,12 @@ import { relaunch } from '@tauri-apps/plugin-process';
const update = await check();
if (update?.available) {
- console.log(`Update to ${update.version} available! Date: ${update.date}`);
- console.log(`Release notes: ${update.body}`);
+ console.log(
+ `¡Actualización a ${update.version} disponible! Fecha: ${update.date}`
+ );
+ console.log(`Notas del parche: ${update.body}`);
await update.downloadAndInstall();
- // requires the `process` plugin
+ // requiere el plugin `process`
await relaunch();
}
```
@@ -1141,9 +1157,9 @@ use tauri::{path::BaseDirectory, Manager};
tauri::Builder::default()
.setup(|app| {
- let home_dir_path = app.path().home_dir().expect("failed to get home dir");
+ let home_dir_path = app.path().home_dir().expect("no se pudo obtener el directorio home");
- let path = app.path().resolve("path/to/something", BaseDirectory::Config)?;
+ let path = app.path().resolve("path/haz/algo", BaseDirectory::Config)?;
Ok(())
})
@@ -1151,7 +1167,7 @@ tauri::Builder::default()
### Migrar a la nueva API de Ventanas
-En el lado de Rust, `Window` fue renombrado a `WebviewWindow` y su constructor `WindowBuilder` ahora se llama `WebviewWindowBuilder`.
+En el lado de Rust, `Window` fue renombrado a `WebviewWindow`, su constructor `WindowBuilder` ahora se llama `WebviewWindowBuilder` y `WindowUrl` ahora se llama `WebviewUrl`.
Además, la función `Manager::get_window` fue renombrada a `get_webview_window` y
la API `parent_window` de la ventana fue renombrada a `parent_raw` para admitir una API de ventana principal de alto nivel.
@@ -1160,13 +1176,20 @@ En el lado de JavaScript, la clase `WebviewWindow` ahora se exporta en la ruta `
La función `onMenuClicked` fue eliminada, ahora puedes interceptar eventos de menú al crear un menú en JavaScript en su lugar.
+### Migrar Archivos Adicionales Incrustados (Recursos)
+
+En el lado de JavaScript, asegúrate de [Migrar al Plugin del Sistema de Archivos](#migrar-al-plugin-del-sistema-de-archivos).
+Además, ten en cuenta que los cambios hechos en la lista blanca de la v1 en [Migrar Permisos](#migrar-permisos).
+
+En el lado de Rust, asegúrate de [Migrar de Path a Tauri Manager](#migrar-de-path-a-tauri-manager).
+
### Migrar de Binarios Externos Incrustados (Sidecar)
En Tauri v1, los binarios externos y sus argumentos se definían en la lista blanca. En la v2, utiliza el nuevo sistema de permisos. Lee [Migración de Permisos](#migrar-permisos) para más información.
En el lado de JavaScript, asegúrate de [Migrar al Plugin Shell](#migrar-al-plugin-shell).
-En el lado de Rust, la API `tauri::api::process` ha sido eliminada. Usa `tauri_plugin_shell::ShellExt` y las APIs `tauri_plugin_shell::process::CommandEvent` en su lugar. Lee la guía de [Incrustar Binarios Externos](/develop/sidecar/#running-it-from-rust) para ver cómo.
+En el lado de Rust, la API `tauri::api::process` ha sido eliminada. Usa `tauri_plugin_shell::ShellExt` y las APIs `tauri_plugin_shell::process::CommandEvent` en su lugar. Lee la guía de [Incrustar Binarios Externos](/es/develop/sidecar/#running-it-from-rust) para ver cómo.
El indicador de características "process-command-api" ha sido eliminado en la v2. Por lo tanto, ejecutar los binarios externos ya no requiere que esta característica esté definida en la configuración de Tauri.
@@ -1179,4 +1202,4 @@ Para habilitar permisos para tu aplicación, debes crear archivos de capacidades
El comando `migrate` de la CLI analiza automáticamente tu lista blanca v1 y genera el archivo de capacidad asociado.
-Para obtener más información sobre permisos y capacidades, consulta [la documentación](/security/).
+Para obtener más información sobre permisos y capacidades, consulta [la documentación de seguridad](/es/security/).
diff --git a/src/content/docs/es/start/prerequisites.mdx b/src/content/docs/es/start/prerequisites.mdx
index e26bd247c4..17aa11511f 100644
--- a/src/content/docs/es/start/prerequisites.mdx
+++ b/src/content/docs/es/start/prerequisites.mdx
@@ -1,6 +1,8 @@
---
title: Prerrequisitos
i18nReady: true
+sidebar:
+ order: 0
---
import { Tabs, TabItem, Card } from '@astrojs/starlight/components';
@@ -36,6 +38,7 @@ sudo apt install libwebkit2gtk-4.1-dev \
curl \
wget \
file \
+ libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
@@ -55,7 +58,8 @@ sudo pacman -S --needed \
openssl \
appmenu-gtk-module \
libappindicator-gtk3 \
- librsvg
+ librsvg \
+ xdotool
```
@@ -69,8 +73,9 @@ sudo dnf install webkit2gtk4.1-devel \
wget \
file \
libappindicator-gtk3-devel \
- librsvg2-devel
-sudo dnf group install "C Development Tools and Libraries"
+ librsvg2-devel \
+ libxdo-devel
+sudo dnf group install "c-development"
```
@@ -100,10 +105,25 @@ sudo zypper in webkit2gtk3-devel \
sudo zypper in -t pattern devel_basis
```
+
+
+```sh
+sudo apk add \
+ build-base \
+ webkit2gtk \
+ curl \
+ wget \
+ file \
+ openssl \
+ libayatana-appindicator-dev \
+ librsvg
+```
-TODO: Need to build out NixOS instructions
+:::note
+Las instrucciones para Nix/NixOS pueden ser encontradas en [NixOS Wiki](https://wiki.nixos.org/wiki/Tauri).
+:::
@@ -146,7 +166,7 @@ Sigue los pasos a continuación para instalar las dependencias requeridas.
1. Descarga el instalador de [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) y ábrelo para comenzar la instalación.
2. Durante la instalación marque la opción "Desarrollo de escritorio con C ++".
-
+
Siguiente: [Instalar WebView2](#webview2).
@@ -186,12 +206,53 @@ Aquí está el archivo como un script plano: [rustup.sh](https://sh.rustup.rs/)
Visita https://www.rust-lang.org/tools/install para instalar `rustup`.
+Alternativamente, puedes user `winget` para instalar rustup usando el siguiente comando en PowerShell:
+
+```powershell
+winget install --id Rustlang.Rustup
+```
+
+:::caution[MSVC toolchain como predeterminado]
+
+Para un soporte total para Tauri y herramientas como [`trunk`](https://trunkrs.dev/) asegurate de que la toolchain MSVC de Rust sea el `default host triple` en el diálogo del instalador. Dependiendo de tu sistema, debería ser `x86_64-pc-windows-msvc`, `i686-pc-windows-msvc`, o `aarch64-pc-windows-msvc`.
+
+Si ya tienes Rust instalado, puedes asegurarte de que esté instalada la toolchain correcta ejecutando el siguiente comando:
+
+```powershell
+rustup default stable-msvc
+```
+
+:::
+
-Asegúrate de reiniciar tu Terminal (y en algunos casos tu sistema) para que los cambios surtan efecto.
+**Asegúrate de reiniciar tu Terminal (y en algunos casos tu sistema) para que los cambios surtan efecto.**
+
+Siguiente: [Configurar para Móvil](#configurar-para-móvil) si deseas construir para Android e iOS, o, si te gustaría usar un framework de JavaScript, [instala Node](#nodejs). De lo contrario, [Crea un Proyecto](/es/start/create-project/).
-Siguiente: [Configurar para Móvil](#configurar-para-móvil) si deseas construir para Android e iOS. De lo contrario, [Crea un Proyecto](/start/create-project/).
+## Node.js
+
+:::note[Ecosistema de JavaScript]
+Solo si tu intención es usar un framework frontend de JavaScript
+:::
+
+1. Visita la [web de Node.js](https://nodejs.org), descarga la version de Soporte a Largo Plazo (LTS) e instálala.
+
+2. Comprueba si Node se ha instalado correctamente ejecutando:
+
+```sh
+node -v
+# v20.10.0
+npm -v
+# 10.2.3
+```
+
+Es importante reiniciar tu Terminal para asegurarse de que reconoce la nueva instalación. En algunos casos, puede que necesites reiniciar tu ordenador.
+
+Aunque npm es el gestor de paquetes predeterminado para Node.js, puedes usar otros como por ejemplo pnpm o yarn. Para habilitarlos, ejecuta `corepack enable` en tu Terminal. Este paso es opcional y únicamente necesario si prefieres usar otro gestor de paquetes que no sea npm.
+
+Next: [Configurar para Móvil](#configurar-para-móvil) o [Crea un proyecto](/es/start/create-project/).
## Configurar para Móvil
@@ -207,7 +268,7 @@ Si deseas compilar tu aplicación para Android o iOS, entonces hay algunas depen
{/* TODO: Can this be done in the 4th step? */}
-
+
```sh
@@ -238,16 +299,16 @@ export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
- Android SDK Build-Tools
- Android SDK Command-line Tools
-4. Establece las variables de entorno `ANDROID_HOME` y `NDK_HOME`. Reemplaza los números de versión para que coincidan con la versión instalada.
+4. Establece las variables de entorno `ANDROID_HOME` y `NDK_HOME`.
{/* TODO: Does the version number change below? */}
-
+
```sh
export ANDROID_HOME="$HOME/Android/Sdk"
-export NDK_HOME="$ANDROID_HOME/ndk/25.0.8775105"
+export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"
```
@@ -255,19 +316,28 @@ export NDK_HOME="$ANDROID_HOME/ndk/25.0.8775105"
```sh
export ANDROID_HOME="$HOME/Library/Android/sdk"
-export NDK_HOME="$ANDROID_HOME/ndk/25.0.8775105"
+export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"
```
-{/* TODO: Do we need a note about this version? */}
-
```ps
[System.Environment]::SetEnvironmentVariable("ANDROID_HOME", "$env:LocalAppData\Android\Sdk", "User")
-[System.Environment]::SetEnvironmentVariable("NDK_HOME", "$env:LocalAppData\Android\Sdk\ndk\25.0.8775105", "User")
+$VERSION = Get-ChildItem -Name "$env:LocalAppData\Android\Sdk\ndk"
+[System.Environment]::SetEnvironmentVariable("NDK_HOME", "$env:LocalAppData\Android\Sdk\ndk\$VERSION", "User")
+```
+
+:::tip
+PowerShell no detectará las nuevas variables de entorno hasta que reinicies o cierres sesión.
+Sin embargo, puedes actualizar la sesión actual:
+
+```ps
+[System.Environment]::GetEnvironmentVariables("User").GetEnumerator() | % { Set-Item -Path "Env:\$($_.key)" -Value $_.value }
```
+:::
+
@@ -291,7 +361,7 @@ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-andro
-Siguiente: [Configurar para iOS](#ios) o [Crear un proyecto](/start/create-project/).
+Siguiente: [Configurar para iOS](#ios) o [Crear un proyecto](/es/start/create-project/).
### iOS
@@ -299,14 +369,12 @@ Siguiente: [Configurar para iOS](#ios) o [Crear un proyecto](/start/create-proje
El desarrollo de iOS requiere Xcode y solo está disponible en macOS. Asegúrate de haber instalado Xcode y no Xcode Command Line Tools en la [sección de dependencias del sistema de macOS](#macos).
:::
-1. Agrega los destinos de compilación de iOS con `rustup` en Terminal:
+1. Agrega los destinos de compilación de iOS con `rustup` en la Terminal:
```sh
rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim
```
-Asegúrate de haber instalado Xcode y no Xcode Command Line Tools en la [sección de dependencias del sistema de macOS](#macos).
-
2. Instala [Homebrew](https://brew.sh):
```sh
@@ -319,14 +387,14 @@ Asegúrate de haber instalado Xcode y no Xcode Command Line Tools en la [secció
brew install cocoapods
```
-Siguiente: [Crear un proyecto](/start/create-project/).
+Siguiente: [Crear un proyecto](/es/start/create-project/).
## Solución de Problemas
-Si tienes algún problema durante la instalación, asegúrate de revisar la [Guía de Solución de Problemas](/develop/debug/) o comunícate en el [Discord de Tauri](https://discord.com/invite/tauri).
+Si tienes algún problema durante la instalación, asegúrate de revisar la [Guía de Solución de Problemas](/es/develop/debug/) o comunícate en el [Discord de Tauri](https://discord.com/invite/tauri).
-¡Ahora que has instalado todos los prerequisitos estás listo para [crear tu primer proyecto Tauri](/start/create-project/)!
+¡Ahora que has instalado todos los prerequisitos estás listo para [crear tu primer proyecto Tauri](/es/start/create-project/)!
diff --git a/src/content/docs/fr/develop/development-cycle.mdx b/src/content/docs/fr/develop/development-cycle.mdx
deleted file mode 100644
index 894a4cd913..0000000000
--- a/src/content/docs/fr/develop/development-cycle.mdx
+++ /dev/null
@@ -1,35 +0,0 @@
----
-title: Development Cycle
----
-
-import CommandTabs from '@components/CommandTabs.astro';
-
-### 1. Démarrez votre serveur de développement
-
-Maintenant que tout est configuré, vous devez démarrer votre serveur de développement d'applications fourni par votre framework ou bundler d'interface utilisateur (en supposant que vous en utilisiez un, bien sûr).
-
-:::note
-
-Chaque framework possède ses propres outils de développement. Il n'entre pas dans le cadre de ce document de les couvrir tous ou de rester à jour.
-
-:::
-
-### 2. Démarrer la fenêtre de développement de Tauri
-
-
-
-La première fois que vous exécutez cette commande, le gestionnaire de packages Rust prend plusieurs minutes pour télécharger et créer tous les packages requis. Comme ils sont mis en cache, les builds suivants sont beaucoup plus rapides, car seul votre code a besoin d'être reconstruit.
-
-Une fois que Rust a terminé la construction, la vue Web s'ouvre et affiche votre application Web. Vous pouvez apporter des modifications à votre application Web, et si vos outils le permettent, la vue Web devrait se mettre à jour automatiquement, tout comme un navigateur. Lorsque vous apportez des modifications à vos fichiers Rust, ils sont reconstruits automatiquement et votre application redémarre automatiquement.
-
-:::caution[À propos de Cargo.toml et du contrôle de code source]
-
-Dans votre référentiel de projet, vous **DEVEZ** valider le `src-tauri/Cargo.lock` avec le `src-tauri/Cargo.toml` sur git car Cargo utilise le fichier de verrouillage pour fournir des versions déterministes. Par conséquent, il est recommandé que toutes les applications enregistrent leur `Cargo.lock`. Vous **NE DEVEZ PAS** valider le dossier `src-tauri/target` ou l'un de ses contenus.
-
-:::
diff --git a/src/content/docs/fr/start/migrate/from-tauri-1.mdx b/src/content/docs/fr/start/migrate/from-tauri-1.mdx
index cb1198bf0a..7830622401 100644
--- a/src/content/docs/fr/start/migrate/from-tauri-1.mdx
+++ b/src/content/docs/fr/start/migrate/from-tauri-1.mdx
@@ -978,8 +978,9 @@ tauri::Builder::default()
{
let app = tray.app_handle();
if let Some(webview_window) = app.get_webview_window("main") {
- let _ = webview_window.show();
- let _ = webview_window.set_focus();
+ let _ = webview_window.unminimize();
+ let _ = webview_window.show();
+ let _ = webview_window.set_focus();
}
}
})
diff --git a/src/content/docs/fr/start/prerequisites.mdx b/src/content/docs/fr/start/prerequisites.mdx
index d423798b87..1e37a541e4 100644
--- a/src/content/docs/fr/start/prerequisites.mdx
+++ b/src/content/docs/fr/start/prerequisites.mdx
@@ -31,13 +31,13 @@ Tauri exige un système varié de dépendances pour le développement sur Linux.
```sh
sudo apt update
-sudo apt install libwebkit2gtk-4.0-dev \
+sudo apt install libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
+ libxdo-dev \
libssl-dev \
- libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev
```
@@ -48,16 +48,16 @@ sudo apt install libwebkit2gtk-4.0-dev \
```sh
sudo pacman -Syu
sudo pacman -S --needed \
- webkit2gtk \
+ webkit2gtk-4.1 \
base-devel \
curl \
wget \
file \
openssl \
appmenu-gtk-module \
- gtk3 \
libappindicator-gtk3 \
- librsvg
+ librsvg \
+ xdotool
```
@@ -65,14 +65,15 @@ sudo pacman -S --needed \
```sh
sudo dnf check-update
-sudo dnf install webkit2gtk4.0-devel \
+sudo dnf install webkit2gtk4.1-devel \
openssl-devel \
curl \
wget \
file \
libappindicator-gtk3-devel \
- librsvg2-devel
-sudo dnf group install "C Development Tools and Libraries"
+ librsvg2-devel \
+ libxdo-devel
+sudo dnf group install "c-development"
```
@@ -92,7 +93,7 @@ sudo emerge --ask \
```sh
sudo zypper up
-sudo zypper in webkit2gtk3-soup2-devel \
+sudo zypper in webkit2gtk3-devel \
libopenssl-devel \
curl \
wget \
@@ -102,10 +103,27 @@ sudo zypper in webkit2gtk3-soup2-devel \
sudo zypper in -t pattern devel_basis
```
+
+
+
+```sh
+sudo apk add \
+ build-base \
+ webkit2gtk \
+ curl \
+ wget \
+ file \
+ openssl \
+ libayatana-appindicator-dev \
+ librsvg
+```
+
-TODO: Need to build out NixOS instructions
+:::note
+Les instructions pour Nix/NixOS peuvent être trouvées dans le [NixOS Wiki](https://wiki.nixos.org/wiki/Tauri).
+:::
@@ -194,7 +212,30 @@ Visitez https://www.rust-lang.org/tools/install pour installer `rustup`.
Assurez-vous de relancer votre terminal (et parfois votre système) pour que les modifications prennent effet.
-Suivant: [Configuration pour Mobile](#configuration-pour-mobile) si vous voulez construire une application pour Android et iOS. Dans le cas contraire, [Create a Project](/start/create-project/).
+Suivant: [Configuration pour Mobile](#configuration-pour-mobile) si vous voulez construire une application pour Android et iOS, ou, si vous souhaitez utiliser un framework JavaScript, commencez par [installer Node](#nodejs). Dans le cas contraire, [créer votre projet Tauri](/fr/start/create-project/).
+
+## Node.js
+
+:::note[JavaScript ecosystem]
+Seulement si vous prévoyez d'utiliser un framework JavaScript frontend.
+:::
+
+1. Allez sur le site [Node.js](https://nodejs.org), télécharger la version Long Term Support (LTS) et l'installer.
+
+2. Vérifiez que Node a été installé avec succès en exécutant:
+
+```sh
+node -v
+# v20.10.0
+npm -v
+# 10.2.3
+```
+
+Il est important de redémarrer votre terminal pour qu'il reconnaisse la nouvelle installation. Dans certains cas, vous devrez redémarrer votre ordinateur.
+
+Bien que npm soit le gestionnaire de paquets par défaut pour Node.js, vous pouvez aussi en utiliser d'autres comme pnpm ou yarn. Pour les activer, lancez `corepack enable` dans votre Terminal. Cette étape est optionnelle et n'est nécessaire que si vous préférez utiliser un gestionnaire de paquets autre que npm.
+
+Suivant: [Configuration pour Mobile](#configuration-pour-mobile) ou [créer votre premier projet Tauri](/fr/start/create-project/).
## Configuration pour Mobile
@@ -246,14 +287,24 @@ export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
{/* TODO: Does the version number change below? */}
-
+
+
+```sh
+export ANDROID_HOME="$HOME/Android/Sdk"
+export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"
+```
+
+
+
+
```sh
export ANDROID_HOME="$HOME/Library/Android/sdk"
-export NDK_HOME="$ANDROID_HOME/ndk/25.0.8775105"
+export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"
```
+
{/* TODO: Do we need a note about this version? */}
@@ -286,30 +337,40 @@ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-andro
-Suivant: [Installation pour Android](#ios) ou [Create a project](/start/create-project/).
+Suivant: [Installation pour Android](#ios) ou [créer votre premier projet Tauri](/fr/start/create-project/).
### iOS
:::caution[macOS Only]
-Le développement iOS exige Xcode et est seulement disponible sur macOS
+Le développement iOS exige Xcode et est seulement disponible sur macOS. Assurez-vous d'avoir installé Xcode et non Xcode Command Line Tools dans la section [Dépendances systèmes macOS](#macos).
:::
-Ajoutez les "targets" iOS avec `rustup` dans le terminal:
+1. Ajoutez les “targets” iOS avec rustup dans le terminal:
```sh
rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim
```
-Assurez-vous d'avoir installé Xcode et non Xcode Command Line Tools dans la section [Dépendances systèmes macOS](#macos).
+2. Installez [Homebrew](https://brew.sh):
+
+```sh
+/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+```
+
+3. Installez [Cocoapods](https://cocoapods.org) using Homebrew:
+
+```sh
+brew install cocoapods
+```
-Suivant: [Create a project](/start/create-project/).
+Suivant: [créer votre projet Tauri](/fr/start/create-project/).
## Problèmes
-Si vous rencontrez un problème durant l'installation, assurez-vous de consulter le [guide de résolution de problèmes](/develop/debug/) ou rejoignez le [Discord de Tauri](https://discord.com/invite/tauri)
+Si vous rencontrez un problème durant l'installation, assurez-vous de consulter le [guide de résolution de problèmes](/fr/develop/debug/) ou rejoignez le [Discord de Tauri](https://discord.com/invite/tauri)
-Maintenant que vous avez installé tous les prérequis, vous êtes fin prêt pour [créer votre premier projet Tauri](/start/create-project/) !
+Maintenant que vous avez installé tous les prérequis, vous êtes fin prêt pour [créer votre premier projet Tauri](/fr/start/create-project/) !
diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx
index e0e4f97f4b..783b6b149c 100644
--- a/src/content/docs/index.mdx
+++ b/src/content/docs/index.mdx
@@ -8,31 +8,21 @@ template: splash
tableOfContents: false
prev: false
next: false
-hero:
- tagline: Create small, fast, secure, cross-platform applications
- image:
- file: ../../assets/logo-outline.svg
- actions:
- - text: Get Started
- link: /start/
- icon: right-arrow
- variant: primary
- - text: Tauri 1.0 Documentation
- link: https://v1.tauri.app
- icon: external
- variant: minimal
---
import { Card, CardGrid, LinkCard } from '@astrojs/starlight/components';
import Cta from '@fragments/cta.mdx';
+import Hero from '@components/Hero.astro';
+import SponsorList from '@components/sponsors/SponsorList.astro';
+import 'src/styles/home.css';
-
-
-
-
-
+
-
+
@@ -46,11 +36,8 @@ import Cta from '@fragments/cta.mdx';
Build your app for Linux, macOS, Windows, Android and iOS - all from a
- single codebase.
-
-
- Write your frontend in JavaScript, application logic in Rust, and integrate
- deep into the system with Swift and Kotlin.
+ single codebase. Write your frontend in JavaScript, application logic in
+ Rust, and integrate deep into the system with Swift and Kotlin.
Front-of-mind for the Tauri Team that drives our highest priorities and
@@ -60,8 +47,6 @@ import Cta from '@fragments/cta.mdx';
By using the OS's native web renderer, the size of a Tauri app can be little
as 600KB.
-
- With performance and security at the center, Rust is the language for the
- next generation of apps.
-
+
+
diff --git a/src/content/docs/it/develop/index.mdx b/src/content/docs/it/develop/index.mdx
index 5be772ca00..769f8bda07 100644
--- a/src/content/docs/it/develop/index.mdx
+++ b/src/content/docs/it/develop/index.mdx
@@ -4,11 +4,12 @@ description: Concetti fondamentali per lo sviluppo con Tauri.
sidebar:
order: 0
label: Panoramica
+draft: true
---
import CommandTabs from '@components/CommandTabs.astro';
-Ora che hai [tutto configurato](/start/), sei pronto per avviare la tua applicazione con Tauri.
+Ora che hai [tutto configurato](/it/start/), sei pronto per avviare la tua applicazione con Tauri.
Se stai usando un framework UI o un bundler di JavaScript, probabilmente avrai già accesso a un server
locale che velocizza il processo di sviluppo, quindi, se non hai ancora configurato l'URL della tua app
@@ -49,7 +50,7 @@ Nota che in questo esempio la cartella `src` deve contenere un file `index.html`
Il server di sviluppo incorporato di Tauri non supporta l'autenticazione o la criptazione
reciproca. Non dovresti mai usarlo per lo sviluppo su reti non affidabili.
-Leggi le [considerazioni sulla sicurezza del server di sviluppo](/security/lifecycle/#development-server)
+Leggi le [considerazioni sulla sicurezza del server di sviluppo](/it/security/lifecycle/#development-server)
per una spiegazione più dettagliata.
:::
diff --git a/src/content/docs/ja/404.md b/src/content/docs/ja/404.md
new file mode 100644
index 0000000000..42fbbac994
--- /dev/null
+++ b/src/content/docs/ja/404.md
@@ -0,0 +1,22 @@
+---
+title: '404'
+topic: guides # this sidebar is active when viewing this page
+template: doc
+editUrl: false
+tableOfContents: false
+lastUpdated: false
+pagefind: false
+next: false
+prev: false
+hero:
+ title: '404'
+ tagline: お探しのページは見つかりません。URL を確認するか、検索バーから再検索してください。
+---
+
+