Compare commits

...

4 Commits

Author SHA1 Message Date
github-actions[bot]
8d869717da apply version updates (#14041)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-19 09:08:54 -03:00
Kushal Meghani
f0172a454a fix(app): correct removeDataStore return type, add docs for getBundle… (#14038)
* fix(app): correct removeDataStore return type, add docs for getBundleType

* add change file

* fmt

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2025-08-19 08:02:21 -03:00
Lucas Fernandes Nogueira
5075b67d36 fix(tauri): build without the wry feature flag (#14039)
* fix(tauri): build without the wry feature flag

* change file

* fix windows
2025-08-19 07:42:41 -03:00
Lucas Nogueira
c3252f72f6 fix(tauri): on_related_view should be behind the wry feature flag 2025-08-18 17:23:06 -03:00
12 changed files with 91 additions and 40 deletions

View File

@@ -95,10 +95,10 @@ jobs:
- name: test
if: ${{ !matrix.platform.cross }}
run: cargo ${{ matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }} --manifest-path crates/tauri/Cargo.toml
run: cargo ${{ matrix.features.key == 'no-default' && 'check' || matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }} --manifest-path crates/tauri/Cargo.toml
- name: test (using cross)
if: ${{ matrix.platform.cross }}
run: |
cargo install cross --git https://github.com/cross-rs/cross --rev 51f46f296253d8122c927c5bb933e3c4f27cc317 --locked
cross ${{ matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }} --manifest-path crates/tauri/Cargo.toml
cross ${{ matrix.features.key == 'no-default' && 'check' || matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }} --manifest-path crates/tauri/Cargo.toml

2
Cargo.lock generated
View File

@@ -8484,7 +8484,7 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "tauri"
version = "2.8.0"
version = "2.8.2"
dependencies = [
"anyhow",
"bytes",

View File

@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema.tauri.app/config/2.8.0",
"$id": "https://schema.tauri.app/config/2.8.2",
"title": "Config",
"description": "The Tauri configuration object.\n It is read from a file where you can define your frontend assets,\n configure the bundler and define a tray icon.\n\n The configuration file is generated by the\n [`tauri init`](https://v2.tauri.app/reference/cli/#init) command that lives in\n your Tauri application source directory (src-tauri).\n\n Once generated, you may modify it at will to customize your Tauri application.\n\n ## File Formats\n\n By default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\n Tauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively.\n The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\n The TOML file name is `Tauri.toml`.\n\n ## Platform-Specific Configuration\n\n In addition to the default configuration file, Tauri can\n read a platform-specific configuration from `tauri.linux.conf.json`,\n `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json`\n (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used),\n which gets merged with the main configuration object.\n\n ## Configuration Structure\n\n The configuration is composed of the following objects:\n\n - [`app`](#appconfig): The Tauri configuration\n - [`build`](#buildconfig): The build configuration\n - [`bundle`](#bundleconfig): The bundle configurations\n - [`plugins`](#pluginconfig): The plugins configuration\n\n Example tauri.config.json file:\n\n ```json\n {\n \"productName\": \"tauri-app\",\n \"version\": \"0.1.0\",\n \"build\": {\n \"beforeBuildCommand\": \"\",\n \"beforeDevCommand\": \"\",\n \"devUrl\": \"http://localhost:3000\",\n \"frontendDist\": \"../dist\"\n },\n \"app\": {\n \"security\": {\n \"csp\": null\n },\n \"windows\": [\n {\n \"fullscreen\": false,\n \"height\": 600,\n \"resizable\": true,\n \"title\": \"Tauri App\",\n \"width\": 800\n }\n ]\n },\n \"bundle\": {},\n \"plugins\": {}\n }\n ```",
"type": "object",

View File

@@ -1,9 +1,9 @@
{
"cli.js": {
"version": "2.8.0",
"version": "2.8.1",
"node": ">= 10.0.0"
},
"tauri": "2.8.0",
"tauri": "2.8.2",
"tauri-build": "2.4.0",
"tauri-plugin": "2.4.0"
}

View File

@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema.tauri.app/config/2.8.0",
"$id": "https://schema.tauri.app/config/2.8.2",
"title": "Config",
"description": "The Tauri configuration object.\n It is read from a file where you can define your frontend assets,\n configure the bundler and define a tray icon.\n\n The configuration file is generated by the\n [`tauri init`](https://v2.tauri.app/reference/cli/#init) command that lives in\n your Tauri application source directory (src-tauri).\n\n Once generated, you may modify it at will to customize your Tauri application.\n\n ## File Formats\n\n By default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\n Tauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively.\n The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\n The TOML file name is `Tauri.toml`.\n\n ## Platform-Specific Configuration\n\n In addition to the default configuration file, Tauri can\n read a platform-specific configuration from `tauri.linux.conf.json`,\n `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json`\n (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used),\n which gets merged with the main configuration object.\n\n ## Configuration Structure\n\n The configuration is composed of the following objects:\n\n - [`app`](#appconfig): The Tauri configuration\n - [`build`](#buildconfig): The build configuration\n - [`bundle`](#bundleconfig): The bundle configurations\n - [`plugins`](#pluginconfig): The plugins configuration\n\n Example tauri.config.json file:\n\n ```json\n {\n \"productName\": \"tauri-app\",\n \"version\": \"0.1.0\",\n \"build\": {\n \"beforeBuildCommand\": \"\",\n \"beforeDevCommand\": \"\",\n \"devUrl\": \"http://localhost:3000\",\n \"frontendDist\": \"../dist\"\n },\n \"app\": {\n \"security\": {\n \"csp\": null\n },\n \"windows\": [\n {\n \"fullscreen\": false,\n \"height\": 600,\n \"resizable\": true,\n \"title\": \"Tauri App\",\n \"width\": 800\n }\n ]\n },\n \"bundle\": {},\n \"plugins\": {}\n }\n ```",
"type": "object",

View File

@@ -1,5 +1,17 @@
# Changelog
## \[2.8.2]
### Bug Fixes
- [`5075b67d3`](https://www.github.com/tauri-apps/tauri/commit/5075b67d368e63e07df5bac5e43c24396460692d) ([#14039](https://www.github.com/tauri-apps/tauri/pull/14039) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fix compilation when the `wry` Cargo feature is disabled.
## \[2.8.1]
### Bug Fixes
- [`902727`](https://www.github.com/tauri-apps/tauri/commit/902727a6acea0bd9569b62ca243ae9563b4ed795) Move `WebviewWindowBuilder::with_related_view` behind the `wry` feature flag.
## \[2.8.0]
### New Features

View File

@@ -1,6 +1,6 @@
[package]
name = "tauri"
version = "2.8.0"
version = "2.8.2"
description = "Make tiny, secure apps for all desktop platforms with Tauri"
exclude = ["/test", "/.scripts", "CHANGELOG.md", "/target"]
readme = "README.md"

View File

@@ -1176,7 +1176,7 @@ fn main() {
/// Set the environment for the webview.
/// Useful if you need to share the same environment, for instance when using the [`Self::on_new_window`].
#[cfg(windows)]
#[cfg(all(feature = "wry", windows))]
pub fn with_environment(
mut self,
environment: webview2_com::Microsoft::Web::WebView2::Win32::ICoreWebView2Environment,
@@ -1187,12 +1187,15 @@ fn main() {
/// Creates a new webview sharing the same web process with the provided webview.
/// Useful if you need to link a webview to another, for instance when using the [`Self::on_new_window`].
#[cfg(any(
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd",
#[cfg(all(
feature = "wry",
any(
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd",
)
))]
pub fn with_related_view(mut self, related_view: webkit2gtk::WebView) -> Self {
self.webview_attributes.related_view.replace(related_view);

View File

@@ -1265,7 +1265,7 @@ impl<R: Runtime, M: Manager<R>> WebviewWindowBuilder<'_, R, M> {
/// Set the environment for the webview.
/// Useful if you need to share the same environment, for instance when using the [`Self::on_new_window`].
#[cfg(windows)]
#[cfg(all(feature = "wry", windows))]
pub fn with_environment(
mut self,
environment: webview2_com::Microsoft::Web::WebView2::Win32::ICoreWebView2Environment,
@@ -1276,12 +1276,15 @@ impl<R: Runtime, M: Manager<R>> WebviewWindowBuilder<'_, R, M> {
/// Creates a new webview sharing the same web process with the provided webview.
/// Useful if you need to link a webview to another, for instance when using the [`Self::on_new_window`].
#[cfg(any(
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
#[cfg(all(
feature = "wry",
any(
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd",
)
))]
pub fn with_related_view(mut self, related_view: webkit2gtk::WebView) -> Self {
self.webview_builder = self.webview_builder.with_related_view(related_view);
@@ -1328,19 +1331,22 @@ impl<R: Runtime, M: Manager<R>> WebviewWindowBuilder<'_, R, M> {
.with_webview_configuration(features.opener().target_configuration.clone());
}
#[cfg(windows)]
#[cfg(all(feature = "wry", windows))]
{
self.webview_builder = self
.webview_builder
.with_environment(features.opener().environment.clone());
}
#[cfg(any(
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
#[cfg(all(
feature = "wry",
any(
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd",
)
))]
{
self.webview_builder = self

View File

@@ -6,6 +6,11 @@ import { invoke } from './core'
import { Image } from './image'
import { Theme } from './window'
/**
* Identifier type used for data stores on macOS and iOS.
*
* Represents a 128-bit identifier, commonly expressed as a 16-byte UUID.
*/
export type DataStoreIdentifier = [
number,
number,
@@ -78,7 +83,7 @@ async function getName(): Promise<string> {
}
/**
* Gets the Tauri version.
* Gets the Tauri framework version used by this application.
*
* @example
* ```typescript
@@ -109,7 +114,8 @@ async function getIdentifier(): Promise<string> {
}
/**
* Shows the application on macOS. This function does not automatically focus any specific app window.
* Shows the application on macOS. This function does not automatically
* focus any specific app window.
*
* @example
* ```typescript
@@ -166,29 +172,28 @@ async function fetchDataStoreIdentifiers(): Promise<DataStoreIdentifier[]> {
* ```typescript
* import { fetchDataStoreIdentifiers, removeDataStore } from '@tauri-apps/api/app';
* for (const id of (await fetchDataStoreIdentifiers())) {
* await removeDataStore(id);
* await removeDataStore(id);
* }
* ```
*
* @since 2.4.0
*/
async function removeDataStore(
uuid: DataStoreIdentifier
): Promise<DataStoreIdentifier[]> {
async function removeDataStore(uuid: DataStoreIdentifier): Promise<void> {
return invoke('plugin:app|remove_data_store', { uuid })
}
/**
* Get the default window icon.
* Gets the default window icon.
*
* @example
* ```typescript
* import { defaultWindowIcon } from '@tauri-apps/api/app';
* await defaultWindowIcon();
* const icon = await defaultWindowIcon();
* ```
*
* @since 2.0.0
*/
async function defaultWindowIcon(): Promise<Image | null> {
return invoke<number | null>('plugin:app|default_window_icon').then((rid) =>
rid ? new Image(rid) : null
@@ -196,7 +201,8 @@ async function defaultWindowIcon(): Promise<Image | null> {
}
/**
* Set app's theme, pass in `null` or `undefined` to follow system theme
* Sets the application's theme. Pass in `null` or `undefined` to follow
* the system theme.
*
* @example
* ```typescript
@@ -217,13 +223,31 @@ async function setTheme(theme?: Theme | null): Promise<void> {
/**
* Sets the dock visibility for the application on macOS.
*
* @param visible whether the dock should be visible or not
* @param visible - Whether the dock should be visible or not.
*
* @example
* ```typescript
* import { setDockVisibility } from '@tauri-apps/api/app';
* await setDockVisibility(false);
* ```
*
* @since 2.5.0
*/
async function setDockVisibility(visible: boolean): Promise<void> {
return invoke('plugin:app|set_dock_visibility', { visible })
}
/**
* Gets the application bundle type.
*
* @example
* ```typescript
* import { getBundleType } from '@tauri-apps/api/app';
* const type = await getBundleType();
* ```
*
* @since 2.5.0
*/
async function getBundleType(): Promise<BundleType> {
return invoke('plugin:app|bundle_type')
}

View File

@@ -1,5 +1,11 @@
# Changelog
## \[2.8.1]
### Bug Fixes
- [`f0172a454`](https://www.github.com/tauri-apps/tauri/commit/f0172a454aea101cb699233be3d73dbf86e64a31) ([#14038](https://www.github.com/tauri-apps/tauri/pull/14038) by [@KushalMeghani1644](https://www.github.com/tauri-apps/tauri/../../KushalMeghani1644)) Fixes `removeDataStore` return type.
## \[2.8.0]
### New Features

View File

@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/cli",
"version": "2.8.0",
"version": "2.8.1",
"description": "Command line interface for building Tauri apps",
"funding": {
"type": "opencollective",