From d54f3b95a63a5b24657e2b206f949d15f8013986 Mon Sep 17 00:00:00 2001 From: Kushal Meghani <168952248+KushalMeghani1644@users.noreply.github.com> Date: Fri, 22 Aug 2025 16:34:57 +0530 Subject: [PATCH 01/35] refactor(bench): improve utils.rs safety, error handling, and docs (#14057) - Replace `unwrap` and `expect` with `anyhow::Result` for safer error handling - Add contextual error messages using `anyhow::Context` - Fix `home_path` on Windows by using `USERPROFILE` instead of `HOMEPATH` - Ensure process helpers (`run_collect`, `run`) return `Result` instead of panicking - Improve parsing logic in `parse_max_mem` and `parse_strace_output` - Add documentation comments for all public functions - Add best-effort cleanup and resilience against malformed input --- bench/src/utils.rs | 233 +++++++++++++++++++++++++-------------------- 1 file changed, 132 insertions(+), 101 deletions(-) diff --git a/bench/src/utils.rs b/bench/src/utils.rs index 090b62ab6..f0a4b83da 100644 --- a/bench/src/utils.rs +++ b/bench/src/utils.rs @@ -2,7 +2,16 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use anyhow::Result; +//! Utility functions for benchmarking tasks in the Tauri project. +//! +//! This module provides helpers for: +//! - Paths to project directories and targets +//! - Running and collecting process outputs +//! - Parsing memory profiler (`mprof`) and syscall profiler (`strace`) outputs +//! - JSON read/write utilities +//! - File download utilities (via `curl` or file copy) + +use anyhow::{bail, Context, Result}; use serde::{Deserialize, Serialize}; use serde_json::Value; use std::{ @@ -13,6 +22,7 @@ use std::{ process::{Command, Output, Stdio}, }; +/// Holds the results of a benchmark run. #[derive(Default, Clone, Serialize, Deserialize, Debug)] pub struct BenchResult { pub created_at: String, @@ -25,7 +35,7 @@ pub struct BenchResult { pub cargo_deps: HashMap, } -#[allow(dead_code)] +/// Represents a single line of parsed `strace` output. #[derive(Debug, Clone, Serialize)] pub struct StraceOutput { pub percent_time: f64, @@ -35,6 +45,7 @@ pub struct StraceOutput { pub errors: u64, } +/// Get the compilation target triple for the current platform. pub fn get_target() -> &'static str { #[cfg(target_os = "macos")] return if cfg!(target_arch = "aarch64") { @@ -42,18 +53,22 @@ pub fn get_target() -> &'static str { } else { "x86_64-apple-darwin" }; + #[cfg(target_os = "ios")] return if cfg!(target_arch = "aarch64") { "aarch64-apple-ios" } else { "x86_64-apple-ios" }; + #[cfg(target_os = "linux")] return "x86_64-unknown-linux-gnu"; + #[cfg(target_os = "windows")] - unimplemented!(); + unimplemented!("Windows target not implemented yet"); } +/// Get the `target/release` directory path for benchmarks. pub fn target_dir() -> PathBuf { bench_root_path() .join("..") @@ -62,83 +77,91 @@ pub fn target_dir() -> PathBuf { .join("release") } +/// Get the root path of the current benchmark crate. pub fn bench_root_path() -> PathBuf { PathBuf::from(env!("CARGO_MANIFEST_DIR")) } -#[allow(dead_code)] +/// Get the home directory of the current user. pub fn home_path() -> PathBuf { #[cfg(any(target_os = "macos", target_os = "ios", target_os = "linux"))] - return PathBuf::from(env!("HOME")); + { + PathBuf::from(std::env::var("HOME").unwrap_or_default()) + } + #[cfg(target_os = "windows")] - return PathBuf::from(env!("HOMEPATH")); + { + PathBuf::from(std::env::var("USERPROFILE").unwrap_or_default()) + } } -#[allow(dead_code)] -pub fn tauri_root_path() -> PathBuf { - bench_root_path().parent().unwrap().to_path_buf() +/// Get the root path of the Tauri repository. +/// Returns `None` if the parent path cannot be determined. +pub fn tauri_root_path() -> Option { + bench_root_path().parent().map(|p| p.to_path_buf()) } -#[allow(dead_code)] -pub fn run_collect(cmd: &[&str]) -> (String, String) { - let mut process_builder = Command::new(cmd[0]); - process_builder +/// Run a command and collect its stdout and stderr as strings. +/// Returns an error if the command fails or exits with a non-zero status. +pub fn run_collect(cmd: &[&str]) -> Result<(String, String)> { + let output: Output = Command::new(cmd[0]) .args(&cmd[1..]) .stdin(Stdio::piped()) .stdout(Stdio::piped()) - .stderr(Stdio::piped()); - let prog = process_builder.spawn().expect("failed to spawn script"); - let Output { - stdout, - stderr, - status, - } = prog.wait_with_output().expect("failed to wait on child"); - let stdout = String::from_utf8_lossy(&stdout).to_string(); - let stderr = String::from_utf8_lossy(&stderr).to_string(); - if !status.success() { - eprintln!("stdout: <<<{stdout}>>>"); - eprintln!("stderr: <<<{stderr}>>>"); - panic!("Unexpected exit code: {:?}", status.code()); + .stderr(Stdio::piped()) + .output() + .with_context(|| format!("failed to execute command: {:?}", cmd))?; + + if !output.status.success() { + bail!( + "Command {:?} exited with {:?}\nstdout:\n{}\nstderr:\n{}", + cmd, + output.status.code(), + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr) + ); } - (stdout, stderr) + + Ok(( + String::from_utf8_lossy(&output.stdout).to_string(), + String::from_utf8_lossy(&output.stderr).to_string(), + )) } -#[allow(dead_code)] -pub fn parse_max_mem(file_path: &str) -> Option { - let file = fs::File::open(file_path).unwrap(); +/// Parse a memory profiler (`mprof`) output file and return the maximum +/// memory usage in bytes. Returns `None` if no values are found. +pub fn parse_max_mem(file_path: &str) -> Result> { + let file = fs::File::open(file_path) + .with_context(|| format!("failed to open mprof output file {file_path}"))?; let output = BufReader::new(file); + let mut highest: u64 = 0; - // MEM 203.437500 1621617192.4123 + for line in output.lines().map_while(Result::ok) { - // split line by space - let split = line.split(' ').collect::>(); + let split: Vec<&str> = line.split(' ').collect(); if split.len() == 3 { - // mprof generate result in MB - let current_bytes = str::parse::(split[1]).unwrap() as u64 * 1024 * 1024; - if current_bytes > highest { - highest = current_bytes; + if let Ok(mb) = split[1].parse::() { + let current_bytes = (mb * 1024.0 * 1024.0) as u64; + highest = highest.max(current_bytes); } } } - fs::remove_file(file_path).unwrap(); + // Best-effort cleanup + let _ = fs::remove_file(file_path); - if highest > 0 { - return Some(highest); - } - - None + Ok(if highest > 0 { Some(highest) } else { None }) } -#[allow(dead_code)] +/// Parse the output of `strace -c` and return a summary of syscalls. pub fn parse_strace_output(output: &str) -> HashMap { let mut summary = HashMap::new(); let mut lines = output .lines() .filter(|line| !line.is_empty() && !line.contains("detached ...")); - let count = lines.clone().count(); + let count = lines.clone().count(); if count < 4 { return summary; } @@ -148,88 +171,90 @@ pub fn parse_strace_output(output: &str) -> HashMap { let data_lines = lines.skip(2); for line in data_lines { - let syscall_fields = line.split_whitespace().collect::>(); + let syscall_fields: Vec<&str> = line.split_whitespace().collect(); let len = syscall_fields.len(); - let syscall_name = syscall_fields.last().unwrap(); - if (5..=6).contains(&len) { - summary.insert( - syscall_name.to_string(), - StraceOutput { - percent_time: str::parse::(syscall_fields[0]).unwrap(), - seconds: str::parse::(syscall_fields[1]).unwrap(), - usecs_per_call: Some(str::parse::(syscall_fields[2]).unwrap()), - calls: str::parse::(syscall_fields[3]).unwrap(), - errors: if syscall_fields.len() < 6 { + if let Some(&syscall_name) = syscall_fields.last() { + if (5..=6).contains(&len) { + let output = StraceOutput { + percent_time: syscall_fields[0].parse().unwrap_or(0.0), + seconds: syscall_fields[1].parse().unwrap_or(0.0), + usecs_per_call: syscall_fields[2].parse().ok(), + calls: syscall_fields[3].parse().unwrap_or(0), + errors: if len < 6 { 0 } else { - str::parse::(syscall_fields[4]).unwrap() + syscall_fields[4].parse().unwrap_or(0) }, - }, - ); + }; + summary.insert(syscall_name.to_string(), output); + } } } - let total_fields = total_line.split_whitespace().collect::>(); - - summary.insert( - "total".to_string(), - match total_fields.len() { - // Old format, has no usecs/call - 5 => StraceOutput { - percent_time: str::parse::(total_fields[0]).unwrap(), - seconds: str::parse::(total_fields[1]).unwrap(), - usecs_per_call: None, - calls: str::parse::(total_fields[2]).unwrap(), - errors: str::parse::(total_fields[3]).unwrap(), - }, - 6 => StraceOutput { - percent_time: str::parse::(total_fields[0]).unwrap(), - seconds: str::parse::(total_fields[1]).unwrap(), - usecs_per_call: Some(str::parse::(total_fields[2]).unwrap()), - calls: str::parse::(total_fields[3]).unwrap(), - errors: str::parse::(total_fields[4]).unwrap(), - }, - _ => panic!("Unexpected total field count: {}", total_fields.len()), + let total_fields: Vec<&str> = total_line.split_whitespace().collect(); + let total = match total_fields.len() { + 5 => StraceOutput { + percent_time: total_fields[0].parse().unwrap_or(0.0), + seconds: total_fields[1].parse().unwrap_or(0.0), + usecs_per_call: None, + calls: total_fields[2].parse().unwrap_or(0), + errors: total_fields[3].parse().unwrap_or(0), }, - ); + 6 => StraceOutput { + percent_time: total_fields[0].parse().unwrap_or(0.0), + seconds: total_fields[1].parse().unwrap_or(0.0), + usecs_per_call: total_fields[2].parse().ok(), + calls: total_fields[3].parse().unwrap_or(0), + errors: total_fields[4].parse().unwrap_or(0), + }, + _ => { + panic!("Unexpected total field count: {}", total_fields.len()); + } + }; + summary.insert("total".to_string(), total); summary } -#[allow(dead_code)] -pub fn run(cmd: &[&str]) { - let mut process_builder = Command::new(cmd[0]); - process_builder.args(&cmd[1..]).stdin(Stdio::piped()); - let mut prog = process_builder.spawn().expect("failed to spawn script"); - let status = prog.wait().expect("failed to wait on child"); +/// Run a command and wait for completion. +/// Returns an error if the command fails. +pub fn run(cmd: &[&str]) -> Result<()> { + let status = Command::new(cmd[0]) + .args(&cmd[1..]) + .stdin(Stdio::piped()) + .status() + .with_context(|| format!("failed to execute command: {:?}", cmd))?; + if !status.success() { - panic!("Unexpected exit code: {:?}", status.code()); + bail!("Command {:?} exited with {:?}", cmd, status.code()); } + Ok(()) } -#[allow(dead_code)] +/// Read a JSON file into a [`serde_json::Value`]. pub fn read_json(filename: &str) -> Result { - let f = fs::File::open(filename)?; + let f = + fs::File::open(filename).with_context(|| format!("failed to open JSON file {filename}"))?; Ok(serde_json::from_reader(f)?) } -#[allow(dead_code)] +/// Write a [`serde_json::Value`] into a JSON file. pub fn write_json(filename: &str, value: &Value) -> Result<()> { - let f = fs::File::create(filename)?; + let f = + fs::File::create(filename).with_context(|| format!("failed to create JSON file {filename}"))?; serde_json::to_writer(f, value)?; Ok(()) } -#[allow(dead_code)] -pub fn download_file(url: &str, filename: PathBuf) { +/// Download a file from either a local path or an HTTP/HTTPS URL. +/// Falls back to copying the file if the URL does not start with http/https. +pub fn download_file(url: &str, filename: PathBuf) -> Result<()> { if !url.starts_with("http:") && !url.starts_with("https:") { - fs::copy(url, filename).unwrap(); - return; + fs::copy(url, &filename).with_context(|| format!("failed to copy from {url}"))?; + return Ok(()); } - // Downloading with curl this saves us from adding - // a Rust HTTP client dependency. println!("Downloading {url}"); let status = Command::new("curl") .arg("-L") @@ -238,8 +263,14 @@ pub fn download_file(url: &str, filename: PathBuf) { .arg(&filename) .arg(url) .status() - .unwrap(); + .with_context(|| format!("failed to execute curl for {url}"))?; - assert!(status.success()); - assert!(filename.exists()); + if !status.success() { + bail!("curl failed with exit code {:?}", status.code()); + } + if !filename.exists() { + bail!("expected file {:?} to exist after download", filename); + } + + Ok(()) } From c0d3f9d47e2dbe8e124b5bddeacb4f0f92b2712e Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sun, 24 Aug 2025 07:14:53 -0300 Subject: [PATCH 02/35] chore(bench): fix build and clippy --- bench/src/build_benchmark_jsons.rs | 2 ++ bench/src/run_benchmark.rs | 13 ++++++------- bench/src/utils.rs | 5 ++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bench/src/build_benchmark_jsons.rs b/bench/src/build_benchmark_jsons.rs index 1a8423aff..26fb46708 100644 --- a/bench/src/build_benchmark_jsons.rs +++ b/bench/src/build_benchmark_jsons.rs @@ -10,6 +10,8 @@ html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/.github/icon.png", html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/.github/icon.png" )] +// file is used by multiple binaries +#![allow(dead_code)] use std::{fs::File, io::BufReader}; mod utils; diff --git a/bench/src/run_benchmark.rs b/bench/src/run_benchmark.rs index 76a73b0a3..e3ea2179a 100644 --- a/bench/src/run_benchmark.rs +++ b/bench/src/run_benchmark.rs @@ -106,10 +106,9 @@ fn run_max_mem_benchmark() -> Result> { let proc_result = proc.wait_with_output()?; println!("{proc_result:?}"); - results.insert( - name.to_string(), - utils::parse_max_mem(benchmark_file).unwrap(), - ); + if let Some(max_mem) = utils::parse_max_mem(benchmark_file)? { + results.insert(name.to_string(), max_mem); + } } Ok(results) @@ -229,7 +228,7 @@ fn run_exec_time(target_dir: &Path) -> Result>()); + utils::run(&command.iter().map(|s| s.as_ref()).collect::>())?; let mut results = HashMap::>::new(); let hyperfine_results = utils::read_json(benchmark_file)?; @@ -264,7 +263,7 @@ fn main() -> Result<()> { utils::download_file( "https://github.com/lemarier/tauri-test/releases/download/v2.0.0/json_3mb.json", json_3mb, - ); + )?; } println!("Starting tauri benchmark"); @@ -278,7 +277,7 @@ fn main() -> Result<()> { let now = time::OffsetDateTime::now_utc(); let mut new_data = utils::BenchResult { created_at: now.format(&format).unwrap(), - sha1: utils::run_collect(&["git", "rev-parse", "HEAD"]) + sha1: utils::run_collect(&["git", "rev-parse", "HEAD"])? .0 .trim() .to_string(), diff --git a/bench/src/utils.rs b/bench/src/utils.rs index f0a4b83da..48d0ba7eb 100644 --- a/bench/src/utils.rs +++ b/bench/src/utils.rs @@ -96,9 +96,8 @@ pub fn home_path() -> PathBuf { } /// Get the root path of the Tauri repository. -/// Returns `None` if the parent path cannot be determined. -pub fn tauri_root_path() -> Option { - bench_root_path().parent().map(|p| p.to_path_buf()) +pub fn tauri_root_path() -> PathBuf { + bench_root_path().parent().map(|p| p.to_path_buf()).unwrap() } /// Run a command and collect its stdout and stderr as strings. From f3df96fb38e2f27ce6bf232fe87f35bcfec50ce4 Mon Sep 17 00:00:00 2001 From: Tony <68118705+Legend-Master@users.noreply.github.com> Date: Sun, 24 Aug 2025 19:16:12 +0800 Subject: [PATCH 03/35] fix(windows): binary patching 32 bit updater type (#14065) * fix(windows): binary patching 32 bit updater type * Use `get` instead of size check and then assert --- .changes/binary-patching-32-bit.md | 5 ++++ .../tauri-bundler/src/bundle/windows/util.rs | 29 +++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 .changes/binary-patching-32-bit.md diff --git a/.changes/binary-patching-32-bit.md b/.changes/binary-patching-32-bit.md new file mode 100644 index 000000000..354facbdc --- /dev/null +++ b/.changes/binary-patching-32-bit.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": "patch:bug" +--- + +Fix binary patching updater type fails on 32 bit Windows builds diff --git a/crates/tauri-bundler/src/bundle/windows/util.rs b/crates/tauri-bundler/src/bundle/windows/util.rs index 38c3299e3..0f3e9bde5 100644 --- a/crates/tauri-bundler/src/bundle/windows/util.rs +++ b/crates/tauri-bundler/src/bundle/windows/util.rs @@ -100,17 +100,16 @@ pub fn patch_binary(binary_path: &PathBuf, package_type: &crate::PackageType) -> .ok_or(crate::Error::MissingBundleTypeVar)?; let data_offset = tauri_bundle_section.pointer_to_raw_data as usize; - - if data_offset + 8 > file_data.len() { - return Err(crate::Error::BinaryOffsetOutOfRange); - } - - let ptr_bytes = &file_data[data_offset..data_offset + 8]; - let ptr_value = u64::from_le_bytes(ptr_bytes.try_into().map_err(|_| { - crate::Error::BinaryParseError( - std::io::Error::new(std::io::ErrorKind::InvalidData, "invalid pointer bytes").into(), - ) - })?); + let pointer_size = if pe.is_64 { 8 } else { 4 }; + let ptr_bytes = file_data + .get(data_offset..data_offset + pointer_size) + .ok_or(crate::Error::BinaryOffsetOutOfRange)?; + // `try_into` is safe to `unwrap` here because we have already checked the slice's size through `get` + let ptr_value = if pe.is_64 { + u64::from_le_bytes(ptr_bytes.try_into().unwrap()) + } else { + u32::from_le_bytes(ptr_bytes.try_into().unwrap()).into() + }; let rdata_section = pe .sections @@ -133,12 +132,10 @@ pub fn patch_binary(binary_path: &PathBuf, package_type: &crate::PackageType) -> let file_offset = rdata_section.pointer_to_raw_data as usize + (rva as usize).saturating_sub(rdata_section.virtual_address as usize); - if file_offset + 3 > file_data.len() { - return Err(crate::Error::BinaryOffsetOutOfRange); - } - // Overwrite the string at that offset - let string_bytes = &mut file_data[file_offset..file_offset + 3]; + let string_bytes = file_data + .get_mut(file_offset..file_offset + 3) + .ok_or(crate::Error::BinaryOffsetOutOfRange)?; match package_type { crate::PackageType::Nsis => string_bytes.copy_from_slice(b"NSS"), crate::PackageType::WindowsMsi => string_bytes.copy_from_slice(b"MSI"), From 5f535b415015b1dc96191dd3bab5ec210a0751be Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sun, 24 Aug 2025 08:17:25 -0300 Subject: [PATCH 04/35] fix(bench): lint warnings --- bench/src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bench/src/utils.rs b/bench/src/utils.rs index 48d0ba7eb..0b6ce1e58 100644 --- a/bench/src/utils.rs +++ b/bench/src/utils.rs @@ -109,7 +109,7 @@ pub fn run_collect(cmd: &[&str]) -> Result<(String, String)> { .stdout(Stdio::piped()) .stderr(Stdio::piped()) .output() - .with_context(|| format!("failed to execute command: {:?}", cmd))?; + .with_context(|| format!("failed to execute command: {cmd:?}"))?; if !output.status.success() { bail!( @@ -223,7 +223,7 @@ pub fn run(cmd: &[&str]) -> Result<()> { .args(&cmd[1..]) .stdin(Stdio::piped()) .status() - .with_context(|| format!("failed to execute command: {:?}", cmd))?; + .with_context(|| format!("failed to execute command: {cmd:?}"))?; if !status.success() { bail!("Command {:?} exited with {:?}", cmd, status.code()); From 534998406433a1be52caa9792d120763ab8339ac Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Sun, 24 Aug 2025 13:18:14 +0200 Subject: [PATCH 05/35] fix: set webview2 path before initializing runtime (#14054) * fix: set webview2 path before initializing runtime * wrong current_exe function --- .changes/fix-webview2-path-timing.md | 5 ++++ crates/tauri/src/app.rs | 39 ++++++++++++++-------------- 2 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 .changes/fix-webview2-path-timing.md diff --git a/.changes/fix-webview2-path-timing.md b/.changes/fix-webview2-path-timing.md new file mode 100644 index 000000000..5551825f6 --- /dev/null +++ b/.changes/fix-webview2-path-timing.md @@ -0,0 +1,5 @@ +--- +tauri: patch:bug +--- + +Fixed an issue that caused the runtime WebView2 detection to fail for FixedRuntime installations. diff --git a/crates/tauri/src/app.rs b/crates/tauri/src/app.rs index 9faa6b9ce..3451306a4 100644 --- a/crates/tauri/src/app.rs +++ b/crates/tauri/src/app.rs @@ -2165,6 +2165,26 @@ tauri::Builder::default() }, }; + // The env var must be set before the Runtime is created so that GetAvailableBrowserVersionString picks it up. + #[cfg(windows)] + { + if let crate::utils::config::WebviewInstallMode::FixedRuntime { path } = + &manager.config.bundle.windows.webview_install_mode + { + if let Some(exe_dir) = crate::utils::platform::current_exe() + .ok() + .and_then(|p| p.parent().map(|p| p.to_path_buf())) + { + std::env::set_var("WEBVIEW2_BROWSER_EXECUTABLE_FOLDER", exe_dir.join(path)); + } else { + #[cfg(debug_assertions)] + eprintln!( + "failed to resolve resource directory; fallback to the installed Webview2 runtime." + ); + } + } + } + #[cfg(any(windows, target_os = "linux"))] let mut runtime = if self.runtime_any_thread { R::new_any_thread(runtime_args)? @@ -2242,25 +2262,6 @@ tauri::Builder::default() app.manage(ChannelDataIpcQueue::default()); app.handle.plugin(crate::ipc::channel::plugin())?; - #[cfg(windows)] - { - if let crate::utils::config::WebviewInstallMode::FixedRuntime { path } = - &app.manager.config().bundle.windows.webview_install_mode - { - if let Ok(resource_dir) = app.path().resource_dir() { - std::env::set_var( - "WEBVIEW2_BROWSER_EXECUTABLE_FOLDER", - resource_dir.join(path), - ); - } else { - #[cfg(debug_assertions)] - eprintln!( - "failed to resolve resource directory; fallback to the installed Webview2 runtime." - ); - } - } - } - let handle = app.handle(); // initialize default tray icon if defined From 2aaa801c35db38b3344d08c64296f05892c5db8d Mon Sep 17 00:00:00 2001 From: Tony <68118705+Legend-Master@users.noreply.github.com> Date: Sun, 24 Aug 2025 21:55:44 +0800 Subject: [PATCH 06/35] Improve documentation of `app > windows` (#14058) --- crates/tauri-cli/config.schema.json | 4 +- .../schemas/config.schema.json | 4 +- crates/tauri-utils/src/config.rs | 63 +++++++++++++++++++ 3 files changed, 67 insertions(+), 4 deletions(-) diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index 47673fd77..9faa548b4 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -164,7 +164,7 @@ "type": "object", "properties": { "windows": { - "description": "The app windows configuration.", + "description": "The app windows configuration.\n\n ## Example:\n\n To create a window at app startup\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n If not specified, the window's label (its identifier) defaults to \"main\",\n you can use this label to get the window through\n `app.get_webview_window` in Rust or `WebviewWindow.getByLabel` in JavaScript\n\n When working with multiple windows, each window will need an unique label\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"label\": \"main\", \"width\": 800, \"height\": 600 },\n { \"label\": \"secondary\", \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n You can also set `create` to false and use this config through the Rust APIs\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"create\": false, \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n and use it like this\n\n ```rust\n tauri::Builder::default()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), app.config().app.windows[0])?.build()?;\n Ok(())\n });\n ```", "default": [], "type": "array", "items": { @@ -230,7 +230,7 @@ "type": "string" }, "create": { - "description": "Whether Tauri should create this window at app startup or not.\n\n When this is set to `false` you must manually grab the config object via `app.config().app.windows`\n and create it with [`WebviewWindowBuilder::from_config`](https://docs.rs/tauri/2/tauri/webview/struct.WebviewWindowBuilder.html#method.from_config).", + "description": "Whether Tauri should create this window at app startup or not.\n\n When this is set to `false` you must manually grab the config object via `app.config().app.windows`\n and create it with [`WebviewWindowBuilder::from_config`](https://docs.rs/tauri/2/tauri/webview/struct.WebviewWindowBuilder.html#method.from_config).\n\n ## Example:\n\n ```rust\n tauri::Builder::default()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), app.config().app.windows[0])?.build()?;\n Ok(())\n });\n ```", "default": true, "type": "boolean" }, diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index 47673fd77..9faa548b4 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -164,7 +164,7 @@ "type": "object", "properties": { "windows": { - "description": "The app windows configuration.", + "description": "The app windows configuration.\n\n ## Example:\n\n To create a window at app startup\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n If not specified, the window's label (its identifier) defaults to \"main\",\n you can use this label to get the window through\n `app.get_webview_window` in Rust or `WebviewWindow.getByLabel` in JavaScript\n\n When working with multiple windows, each window will need an unique label\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"label\": \"main\", \"width\": 800, \"height\": 600 },\n { \"label\": \"secondary\", \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n You can also set `create` to false and use this config through the Rust APIs\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"create\": false, \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n and use it like this\n\n ```rust\n tauri::Builder::default()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), app.config().app.windows[0])?.build()?;\n Ok(())\n });\n ```", "default": [], "type": "array", "items": { @@ -230,7 +230,7 @@ "type": "string" }, "create": { - "description": "Whether Tauri should create this window at app startup or not.\n\n When this is set to `false` you must manually grab the config object via `app.config().app.windows`\n and create it with [`WebviewWindowBuilder::from_config`](https://docs.rs/tauri/2/tauri/webview/struct.WebviewWindowBuilder.html#method.from_config).", + "description": "Whether Tauri should create this window at app startup or not.\n\n When this is set to `false` you must manually grab the config object via `app.config().app.windows`\n and create it with [`WebviewWindowBuilder::from_config`](https://docs.rs/tauri/2/tauri/webview/struct.WebviewWindowBuilder.html#method.from_config).\n\n ## Example:\n\n ```rust\n tauri::Builder::default()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), app.config().app.windows[0])?.build()?;\n Ok(())\n });\n ```", "default": true, "type": "boolean" }, diff --git a/crates/tauri-utils/src/config.rs b/crates/tauri-utils/src/config.rs index 937f208fe..66e1a4670 100644 --- a/crates/tauri-utils/src/config.rs +++ b/crates/tauri-utils/src/config.rs @@ -1559,6 +1559,16 @@ pub struct WindowConfig { /// /// When this is set to `false` you must manually grab the config object via `app.config().app.windows` /// and create it with [`WebviewWindowBuilder::from_config`](https://docs.rs/tauri/2/tauri/webview/struct.WebviewWindowBuilder.html#method.from_config). + /// + /// ## Example: + /// + /// ```rust + /// tauri::Builder::default() + /// .setup(|app| { + /// tauri::WebviewWindowBuilder::from_config(app.handle(), app.config().app.windows[0])?.build()?; + /// Ok(()) + /// }); + /// ``` #[serde(default = "default_true")] pub create: bool, /// The window webview URL. @@ -2557,6 +2567,59 @@ impl Default for PatternKind { #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct AppConfig { /// The app windows configuration. + /// + /// ## Example: + /// + /// To create a window at app startup + /// + /// ```json + /// { + /// "app": { + /// "windows": [ + /// { "width": 800, "height": 600 } + /// ] + /// } + /// } + /// ``` + /// + /// If not specified, the window's label (its identifier) defaults to "main", + /// you can use this label to get the window through + /// `app.get_webview_window` in Rust or `WebviewWindow.getByLabel` in JavaScript + /// + /// When working with multiple windows, each window will need an unique label + /// + /// ```json + /// { + /// "app": { + /// "windows": [ + /// { "label": "main", "width": 800, "height": 600 }, + /// { "label": "secondary", "width": 800, "height": 600 } + /// ] + /// } + /// } + /// ``` + /// + /// You can also set `create` to false and use this config through the Rust APIs + /// + /// ```json + /// { + /// "app": { + /// "windows": [ + /// { "create": false, "width": 800, "height": 600 } + /// ] + /// } + /// } + /// ``` + /// + /// and use it like this + /// + /// ```rust + /// tauri::Builder::default() + /// .setup(|app| { + /// tauri::WebviewWindowBuilder::from_config(app.handle(), app.config().app.windows[0])?.build()?; + /// Ok(()) + /// }); + /// ``` #[serde(default)] pub windows: Vec, /// Security configuration. From 662b39adb33d1d26f0de213e5a04fc4116fd0683 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 24 Aug 2025 11:38:07 -0300 Subject: [PATCH 07/35] apply version updates (#14070) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changes/binary-patching-32-bit.md | 5 ----- .changes/fix-webview2-path-timing.md | 5 ----- Cargo.lock | 12 ++++++------ crates/tauri-bundler/CHANGELOG.md | 6 ++++++ crates/tauri-bundler/Cargo.toml | 2 +- crates/tauri-cli/CHANGELOG.md | 6 ++++++ crates/tauri-cli/Cargo.toml | 4 ++-- crates/tauri-cli/config.schema.json | 2 +- crates/tauri-cli/metadata-v2.json | 4 ++-- .../schemas/config.schema.json | 2 +- crates/tauri/CHANGELOG.md | 6 ++++++ crates/tauri/Cargo.toml | 2 +- packages/cli/CHANGELOG.md | 6 ++++++ packages/cli/package.json | 2 +- 14 files changed, 39 insertions(+), 25 deletions(-) delete mode 100644 .changes/binary-patching-32-bit.md delete mode 100644 .changes/fix-webview2-path-timing.md diff --git a/.changes/binary-patching-32-bit.md b/.changes/binary-patching-32-bit.md deleted file mode 100644 index 354facbdc..000000000 --- a/.changes/binary-patching-32-bit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-bundler": "patch:bug" ---- - -Fix binary patching updater type fails on 32 bit Windows builds diff --git a/.changes/fix-webview2-path-timing.md b/.changes/fix-webview2-path-timing.md deleted file mode 100644 index 5551825f6..000000000 --- a/.changes/fix-webview2-path-timing.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tauri: patch:bug ---- - -Fixed an issue that caused the runtime WebView2 detection to fail for FixedRuntime installations. diff --git a/Cargo.lock b/Cargo.lock index 01f569db7..089a39b44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1319,7 +1319,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -4311,7 +4311,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -8484,7 +8484,7 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.8.2" +version = "2.8.3" dependencies = [ "anyhow", "bytes", @@ -8567,7 +8567,7 @@ dependencies = [ [[package]] name = "tauri-bundler" -version = "2.6.0" +version = "2.6.1" dependencies = [ "anyhow", "ar", @@ -8613,7 +8613,7 @@ dependencies = [ [[package]] name = "tauri-cli" -version = "2.8.0" +version = "2.8.1" dependencies = [ "anyhow", "ar", @@ -10311,7 +10311,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/crates/tauri-bundler/CHANGELOG.md b/crates/tauri-bundler/CHANGELOG.md index 1a532f516..bfc358258 100644 --- a/crates/tauri-bundler/CHANGELOG.md +++ b/crates/tauri-bundler/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[2.6.1] + +### Bug Fixes + +- [`f3df96fb3`](https://www.github.com/tauri-apps/tauri/commit/f3df96fb38e2f27ce6bf232fe87f35bcfec50ce4) ([#14065](https://www.github.com/tauri-apps/tauri/pull/14065) by [@Legend-Master](https://www.github.com/tauri-apps/tauri/../../Legend-Master)) Fix binary patching updater type fails on 32 bit Windows builds + ## \[2.6.0] ### New Features diff --git a/crates/tauri-bundler/Cargo.toml b/crates/tauri-bundler/Cargo.toml index 3093373f9..171d38ab3 100644 --- a/crates/tauri-bundler/Cargo.toml +++ b/crates/tauri-bundler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-bundler" -version = "2.6.0" +version = "2.6.1" authors = [ "George Burton ", "Tauri Programme within The Commons Conservancy", diff --git a/crates/tauri-cli/CHANGELOG.md b/crates/tauri-cli/CHANGELOG.md index cd7d10a71..7e5ed4e52 100644 --- a/crates/tauri-cli/CHANGELOG.md +++ b/crates/tauri-cli/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[2.8.1] + +### Dependencies + +- Upgraded to `tauri-bundler@2.6.1` + ## \[2.8.0] ### New Features diff --git a/crates/tauri-cli/Cargo.toml b/crates/tauri-cli/Cargo.toml index 694fe8b4a..190ce9faf 100644 --- a/crates/tauri-cli/Cargo.toml +++ b/crates/tauri-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-cli" -version = "2.8.0" +version = "2.8.1" authors = ["Tauri Programme within The Commons Conservancy"] edition = "2021" rust-version = "1.77.2" @@ -47,7 +47,7 @@ sublime_fuzzy = "0.7" clap_complete = "4" clap = { version = "4", features = ["derive", "env"] } anyhow = "1" -tauri-bundler = { version = "2.6.0", default-features = false, path = "../tauri-bundler" } +tauri-bundler = { version = "2.6.1", default-features = false, path = "../tauri-bundler" } colored = "2" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["preserve_order"] } diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index 9faa548b4..27f3e661f 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://schema.tauri.app/config/2.8.2", + "$id": "https://schema.tauri.app/config/2.8.3", "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", diff --git a/crates/tauri-cli/metadata-v2.json b/crates/tauri-cli/metadata-v2.json index 5b865a627..3354c1747 100644 --- a/crates/tauri-cli/metadata-v2.json +++ b/crates/tauri-cli/metadata-v2.json @@ -1,9 +1,9 @@ { "cli.js": { - "version": "2.8.1", + "version": "2.8.2", "node": ">= 10.0.0" }, - "tauri": "2.8.2", + "tauri": "2.8.3", "tauri-build": "2.4.0", "tauri-plugin": "2.4.0" } diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index 9faa548b4..27f3e661f 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://schema.tauri.app/config/2.8.2", + "$id": "https://schema.tauri.app/config/2.8.3", "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", diff --git a/crates/tauri/CHANGELOG.md b/crates/tauri/CHANGELOG.md index 8d674f386..25d5ad356 100644 --- a/crates/tauri/CHANGELOG.md +++ b/crates/tauri/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[2.8.3] + +### Bug Fixes + +- [`534998406`](https://www.github.com/tauri-apps/tauri/commit/534998406433a1be52caa9792d120763ab8339ac) ([#14054](https://www.github.com/tauri-apps/tauri/pull/14054) by [@FabianLars](https://www.github.com/tauri-apps/tauri/../../FabianLars)) Fixed an issue that caused the runtime WebView2 detection to fail for FixedRuntime installations. + ## \[2.8.2] ### Bug Fixes diff --git a/crates/tauri/Cargo.toml b/crates/tauri/Cargo.toml index e1bba78c7..2fdec8c24 100644 --- a/crates/tauri/Cargo.toml +++ b/crates/tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri" -version = "2.8.2" +version = "2.8.3" description = "Make tiny, secure apps for all desktop platforms with Tauri" exclude = ["/test", "/.scripts", "CHANGELOG.md", "/target"] readme = "README.md" diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index da2acadd3..a3008f9bc 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[2.8.2] + +### Dependencies + +- Upgraded to `tauri-cli@2.8.1` + ## \[2.8.1] ### Bug Fixes diff --git a/packages/cli/package.json b/packages/cli/package.json index 4823accd8..ac87efb74 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/cli", - "version": "2.8.1", + "version": "2.8.2", "description": "Command line interface for building Tauri apps", "funding": { "type": "opencollective", From 11800a00712043a2503568fcc791c5079d90c60c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 09:25:53 +0800 Subject: [PATCH 08/35] chore(deps): update rust crate jsonschema to 0.33 (#14074) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Cargo.lock | 8 ++++---- crates/tauri-cli/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 089a39b44..1dcd17693 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4112,9 +4112,9 @@ dependencies = [ [[package]] name = "jsonschema" -version = "0.32.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24690c68dfcdde5980d676b0f1820981841016b1f29eecb4c42ad48ab4118681" +checksum = "d46662859bc5f60a145b75f4632fbadc84e829e45df6c5de74cfc8e05acb96b5" dependencies = [ "ahash 0.8.11", "base64 0.22.1", @@ -6715,9 +6715,9 @@ dependencies = [ [[package]] name = "referencing" -version = "0.32.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3d769362109497b240e66462606bc28af68116436c8669bac17069533b908e" +checksum = "9e9c261f7ce75418b3beadfb3f0eb1299fe8eb9640deba45ffa2cb783098697d" dependencies = [ "ahash 0.8.11", "fluent-uri", diff --git a/crates/tauri-cli/Cargo.toml b/crates/tauri-cli/Cargo.toml index 190ce9faf..25cfef8cd 100644 --- a/crates/tauri-cli/Cargo.toml +++ b/crates/tauri-cli/Cargo.toml @@ -66,7 +66,7 @@ tauri-utils = { version = "2.7.0", path = "../tauri-utils", features = [ "html-manipulation", ] } toml = "0.9" -jsonschema = "0.32" +jsonschema = "0.33" handlebars = "6" include_dir = "0.7" minisign = "=0.7.3" From bc829ee24d425fccc2d6fe2cac55b153cfd21d71 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 12:55:18 +0800 Subject: [PATCH 09/35] chore(deps): update dependency rollup to v4.48.0 (#14053) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- packages/api/package.json | 2 +- pnpm-lock.yaml | 190 +++++++++++++++++++------------------- 2 files changed, 96 insertions(+), 96 deletions(-) diff --git a/packages/api/package.json b/packages/api/package.json index 7993b9c82..d4cf28389 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -55,7 +55,7 @@ "eslint-plugin-security": "3.0.1", "fast-glob": "3.3.3", "globals": "^16.2.0", - "rollup": "4.46.4", + "rollup": "4.48.0", "tslib": "^2.8.1", "typescript": "^5.8.3", "typescript-eslint": "^8.34.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2f3ccd54e..39159200a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,10 +63,10 @@ importers: version: 9.29.0 '@rollup/plugin-terser': specifier: 0.4.4 - version: 0.4.4(rollup@4.46.4) + version: 0.4.4(rollup@4.48.0) '@rollup/plugin-typescript': specifier: 12.1.4 - version: 12.1.4(rollup@4.46.4)(tslib@2.8.1)(typescript@5.8.3) + version: 12.1.4(rollup@4.48.0)(tslib@2.8.1)(typescript@5.8.3) '@types/eslint': specifier: ^9.6.1 version: 9.6.1 @@ -89,8 +89,8 @@ importers: specifier: ^16.2.0 version: 16.2.0 rollup: - specifier: 4.46.4 - version: 4.46.4 + specifier: 4.48.0 + version: 4.48.0 tslib: specifier: ^2.8.1 version: 2.8.1 @@ -1103,103 +1103,103 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.46.4': - resolution: {integrity: sha512-B2wfzCJ+ps/OBzRjeds7DlJumCU3rXMxJJS1vzURyj7+KBHGONm7c9q1TfdBl4vCuNMkDvARn3PBl2wZzuR5mw==} + '@rollup/rollup-android-arm-eabi@4.48.0': + resolution: {integrity: sha512-aVzKH922ogVAWkKiyKXorjYymz2084zrhrZRXtLrA5eEx5SO8Dj0c/4FpCHZyn7MKzhW2pW4tK28vVr+5oQ2xw==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.46.4': - resolution: {integrity: sha512-FGJYXvYdn8Bs6lAlBZYT5n+4x0ciEp4cmttsvKAZc/c8/JiPaQK8u0c/86vKX8lA7OY/+37lIQSe0YoAImvBAA==} + '@rollup/rollup-android-arm64@4.48.0': + resolution: {integrity: sha512-diOdQuw43xTa1RddAFbhIA8toirSzFMcnIg8kvlzRbK26xqEnKJ/vqQnghTAajy2Dcy42v+GMPMo6jq67od+Dw==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.46.4': - resolution: {integrity: sha512-/9qwE/BM7ATw/W/OFEMTm3dmywbJyLQb4f4v5nmOjgYxPIGpw7HaxRi6LnD4Pjn/q7k55FGeHe1/OD02w63apA==} + '@rollup/rollup-darwin-arm64@4.48.0': + resolution: {integrity: sha512-QhR2KA18fPlJWFefySJPDYZELaVqIUVnYgAOdtJ+B/uH96CFg2l1TQpX19XpUMWUqMyIiyY45wje8K6F4w4/CA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.46.4': - resolution: {integrity: sha512-QkWfNbeRuzFnv2d0aPlrzcA3Ebq2mE8kX/5Pl7VdRShbPBjSnom7dbT8E3Jmhxo2RL784hyqGvR5KHavCJQciw==} + '@rollup/rollup-darwin-x64@4.48.0': + resolution: {integrity: sha512-Q9RMXnQVJ5S1SYpNSTwXDpoQLgJ/fbInWOyjbCnnqTElEyeNvLAB3QvG5xmMQMhFN74bB5ZZJYkKaFPcOG8sGg==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.46.4': - resolution: {integrity: sha512-+ToyOMYnSfV8D+ckxO6NthPln/PDNp1P6INcNypfZ7muLmEvPKXqduUiD8DlJpMMT8LxHcE5W0dK9kXfJke9Zw==} + '@rollup/rollup-freebsd-arm64@4.48.0': + resolution: {integrity: sha512-3jzOhHWM8O8PSfyft+ghXZfBkZawQA0PUGtadKYxFqpcYlOYjTi06WsnYBsbMHLawr+4uWirLlbhcYLHDXR16w==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.46.4': - resolution: {integrity: sha512-cGT6ey/W+sje6zywbLiqmkfkO210FgRz7tepWAzzEVgQU8Hn91JJmQWNqs55IuglG8sJdzk7XfNgmGRtcYlo1w==} + '@rollup/rollup-freebsd-x64@4.48.0': + resolution: {integrity: sha512-NcD5uVUmE73C/TPJqf78hInZmiSBsDpz3iD5MF/BuB+qzm4ooF2S1HfeTChj5K4AV3y19FFPgxonsxiEpy8v/A==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.46.4': - resolution: {integrity: sha512-9fhTJyOb275w5RofPSl8lpr4jFowd+H4oQKJ9XTYzD1JWgxdZKE8bA6d4npuiMemkecQOcigX01FNZNCYnQBdA==} + '@rollup/rollup-linux-arm-gnueabihf@4.48.0': + resolution: {integrity: sha512-JWnrj8qZgLWRNHr7NbpdnrQ8kcg09EBBq8jVOjmtlB3c8C6IrynAJSMhMVGME4YfTJzIkJqvSUSVJRqkDnu/aA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.46.4': - resolution: {integrity: sha512-+6kCIM5Zjvz2HwPl/udgVs07tPMIp1VU2Y0c72ezjOvSvEfAIWsUgpcSDvnC7g9NrjYR6X9bZT92mZZ90TfvXw==} + '@rollup/rollup-linux-arm-musleabihf@4.48.0': + resolution: {integrity: sha512-9xu92F0TxuMH0tD6tG3+GtngwdgSf8Bnz+YcsPG91/r5Vgh5LNofO48jV55priA95p3c92FLmPM7CvsVlnSbGQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.46.4': - resolution: {integrity: sha512-SWuXdnsayCZL4lXoo6jn0yyAj7TTjWE4NwDVt9s7cmu6poMhtiras5c8h6Ih6Y0Zk6Z+8t/mLumvpdSPTWub2Q==} + '@rollup/rollup-linux-arm64-gnu@4.48.0': + resolution: {integrity: sha512-NLtvJB5YpWn7jlp1rJiY0s+G1Z1IVmkDuiywiqUhh96MIraC0n7XQc2SZ1CZz14shqkM+XN2UrfIo7JB6UufOA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.46.4': - resolution: {integrity: sha512-vDknMDqtMhrrroa5kyX6tuC0aRZZlQ+ipDfbXd2YGz5HeV2t8HOl/FDAd2ynhs7Ki5VooWiiZcCtxiZ4IjqZwQ==} + '@rollup/rollup-linux-arm64-musl@4.48.0': + resolution: {integrity: sha512-QJ4hCOnz2SXgCh+HmpvZkM+0NSGcZACyYS8DGbWn2PbmA0e5xUk4bIP8eqJyNXLtyB4gZ3/XyvKtQ1IFH671vQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.46.4': - resolution: {integrity: sha512-mCBkjRZWhvjtl/x+Bd4fQkWZT8canStKDxGrHlBiTnZmJnWygGcvBylzLVCZXka4dco5ymkWhZlLwKCGFF4ivw==} + '@rollup/rollup-linux-loongarch64-gnu@4.48.0': + resolution: {integrity: sha512-Pk0qlGJnhILdIC5zSKQnprFjrGmjfDM7TPZ0FKJxRkoo+kgMRAg4ps1VlTZf8u2vohSicLg7NP+cA5qE96PaFg==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.46.4': - resolution: {integrity: sha512-YMdz2phOTFF+Z66dQfGf0gmeDSi5DJzY5bpZyeg9CPBkV9QDzJ1yFRlmi/j7WWRf3hYIWrOaJj5jsfwgc8GTHQ==} + '@rollup/rollup-linux-ppc64-gnu@4.48.0': + resolution: {integrity: sha512-/dNFc6rTpoOzgp5GKoYjT6uLo8okR/Chi2ECOmCZiS4oqh3mc95pThWma7Bgyk6/WTEvjDINpiBCuecPLOgBLQ==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.46.4': - resolution: {integrity: sha512-r0WKLSfFAK8ucG024v2yiLSJMedoWvk8yWqfNICX28NHDGeu3F/wBf8KG6mclghx4FsLePxJr/9N8rIj1PtCnw==} + '@rollup/rollup-linux-riscv64-gnu@4.48.0': + resolution: {integrity: sha512-YBwXsvsFI8CVA4ej+bJF2d9uAeIiSkqKSPQNn0Wyh4eMDY4wxuSp71BauPjQNCKK2tD2/ksJ7uhJ8X/PVY9bHQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.46.4': - resolution: {integrity: sha512-IaizpPP2UQU3MNyPH1u0Xxbm73D+4OupL0bjo4Hm0496e2wg3zuvoAIhubkD1NGy9fXILEExPQy87mweujEatA==} + '@rollup/rollup-linux-riscv64-musl@4.48.0': + resolution: {integrity: sha512-FI3Rr2aGAtl1aHzbkBIamsQyuauYtTF9SDUJ8n2wMXuuxwchC3QkumZa1TEXYIv/1AUp1a25Kwy6ONArvnyeVQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.46.4': - resolution: {integrity: sha512-aCM29orANR0a8wk896p6UEgIfupReupnmISz6SUwMIwTGaTI8MuKdE0OD2LvEg8ondDyZdMvnaN3bW4nFbATPA==} + '@rollup/rollup-linux-s390x-gnu@4.48.0': + resolution: {integrity: sha512-Dx7qH0/rvNNFmCcIRe1pyQ9/H0XO4v/f0SDoafwRYwc2J7bJZ5N4CHL/cdjamISZ5Cgnon6iazAVRFlxSoHQnQ==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.46.4': - resolution: {integrity: sha512-0Xj1vZE3cbr/wda8d/m+UeuSL+TDpuozzdD4QaSzu/xSOMK0Su5RhIkF7KVHFQsobemUNHPLEcYllL7ZTCP/Cg==} + '@rollup/rollup-linux-x64-gnu@4.48.0': + resolution: {integrity: sha512-GUdZKTeKBq9WmEBzvFYuC88yk26vT66lQV8D5+9TgkfbewhLaTHRNATyzpQwwbHIfJvDJ3N9WJ90wK/uR3cy3Q==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.46.4': - resolution: {integrity: sha512-kM/orjpolfA5yxsx84kI6bnK47AAZuWxglGKcNmokw2yy9i5eHY5UAjcX45jemTJnfHAWo3/hOoRqEeeTdL5hw==} + '@rollup/rollup-linux-x64-musl@4.48.0': + resolution: {integrity: sha512-ao58Adz/v14MWpQgYAb4a4h3fdw73DrDGtaiF7Opds5wNyEQwtO6M9dBh89nke0yoZzzaegq6J/EXs7eBebG8A==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.46.4': - resolution: {integrity: sha512-cNLH4psMEsWKILW0isbpQA2OvjXLbKvnkcJFmqAptPQbtLrobiapBJVj6RoIvg6UXVp5w0wnIfd/Q56cNpF+Ew==} + '@rollup/rollup-win32-arm64-msvc@4.48.0': + resolution: {integrity: sha512-kpFno46bHtjZVdRIOxqaGeiABiToo2J+st7Yce+aiAoo1H0xPi2keyQIP04n2JjDVuxBN6bSz9R6RdTK5hIppw==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.46.4': - resolution: {integrity: sha512-OiEa5lRhiANpv4SfwYVgQ3opYWi/QmPDC5ve21m8G9pf6ZO+aX1g2EEF1/IFaM1xPSP7mK0msTRXlPs6mIagkg==} + '@rollup/rollup-win32-ia32-msvc@4.48.0': + resolution: {integrity: sha512-rFYrk4lLk9YUTIeihnQMiwMr6gDhGGSbWThPEDfBoU/HdAtOzPXeexKi7yU8jO+LWRKnmqPN9NviHQf6GDwBcQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.46.4': - resolution: {integrity: sha512-IKL9mewGZ5UuuX4NQlwOmxPyqielvkAPUS2s1cl6yWjjQvyN3h5JTdVFGD5Jr5xMjRC8setOfGQDVgX8V+dkjg==} + '@rollup/rollup-win32-x64-msvc@4.48.0': + resolution: {integrity: sha512-sq0hHLTgdtwOPDB5SJOuaoHyiP1qSwg+71TQWk8iDS04bW1wIE0oQ6otPiRj2ZvLYNASLMaTp8QRGUVZ+5OL5A==} cpu: [x64] os: [win32] @@ -2157,8 +2157,8 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rollup@4.46.4: - resolution: {integrity: sha512-YbxoxvoqNg9zAmw4+vzh1FkGAiZRK+LhnSrbSrSXMdZYsRPDWoshcSd/pldKRO6lWzv/e9TiJAVQyirYIeSIPQ==} + rollup@4.48.0: + resolution: {integrity: sha512-BXHRqK1vyt9XVSEHZ9y7xdYtuYbwVod2mLwOMFP7t/Eqoc1pHRlG/WdV2qNeNvZHRQdLedaFycljaYYM96RqJQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -3312,89 +3312,89 @@ snapshots: dependencies: quansync: 0.2.10 - '@rollup/plugin-terser@0.4.4(rollup@4.46.4)': + '@rollup/plugin-terser@0.4.4(rollup@4.48.0)': dependencies: serialize-javascript: 6.0.2 smob: 1.5.0 terser: 5.43.1 optionalDependencies: - rollup: 4.46.4 + rollup: 4.48.0 - '@rollup/plugin-typescript@12.1.4(rollup@4.46.4)(tslib@2.8.1)(typescript@5.8.3)': + '@rollup/plugin-typescript@12.1.4(rollup@4.48.0)(tslib@2.8.1)(typescript@5.8.3)': dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.46.4) + '@rollup/pluginutils': 5.2.0(rollup@4.48.0) resolve: 1.22.10 typescript: 5.8.3 optionalDependencies: - rollup: 4.46.4 + rollup: 4.48.0 tslib: 2.8.1 - '@rollup/pluginutils@5.2.0(rollup@4.46.4)': + '@rollup/pluginutils@5.2.0(rollup@4.48.0)': dependencies: '@types/estree': 1.0.8 estree-walker: 2.0.2 picomatch: 4.0.2 optionalDependencies: - rollup: 4.46.4 + rollup: 4.48.0 - '@rollup/rollup-android-arm-eabi@4.46.4': + '@rollup/rollup-android-arm-eabi@4.48.0': optional: true - '@rollup/rollup-android-arm64@4.46.4': + '@rollup/rollup-android-arm64@4.48.0': optional: true - '@rollup/rollup-darwin-arm64@4.46.4': + '@rollup/rollup-darwin-arm64@4.48.0': optional: true - '@rollup/rollup-darwin-x64@4.46.4': + '@rollup/rollup-darwin-x64@4.48.0': optional: true - '@rollup/rollup-freebsd-arm64@4.46.4': + '@rollup/rollup-freebsd-arm64@4.48.0': optional: true - '@rollup/rollup-freebsd-x64@4.46.4': + '@rollup/rollup-freebsd-x64@4.48.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.46.4': + '@rollup/rollup-linux-arm-gnueabihf@4.48.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.46.4': + '@rollup/rollup-linux-arm-musleabihf@4.48.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.46.4': + '@rollup/rollup-linux-arm64-gnu@4.48.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.46.4': + '@rollup/rollup-linux-arm64-musl@4.48.0': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.46.4': + '@rollup/rollup-linux-loongarch64-gnu@4.48.0': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.46.4': + '@rollup/rollup-linux-ppc64-gnu@4.48.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.46.4': + '@rollup/rollup-linux-riscv64-gnu@4.48.0': optional: true - '@rollup/rollup-linux-riscv64-musl@4.46.4': + '@rollup/rollup-linux-riscv64-musl@4.48.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.46.4': + '@rollup/rollup-linux-s390x-gnu@4.48.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.46.4': + '@rollup/rollup-linux-x64-gnu@4.48.0': optional: true - '@rollup/rollup-linux-x64-musl@4.46.4': + '@rollup/rollup-linux-x64-musl@4.48.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.46.4': + '@rollup/rollup-win32-arm64-msvc@4.48.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.46.4': + '@rollup/rollup-win32-ia32-msvc@4.48.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.46.4': + '@rollup/rollup-win32-x64-msvc@4.48.0': optional: true '@sveltejs/acorn-typescript@1.0.5(acorn@8.15.0)': @@ -4448,30 +4448,30 @@ snapshots: reusify@1.1.0: {} - rollup@4.46.4: + rollup@4.48.0: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.46.4 - '@rollup/rollup-android-arm64': 4.46.4 - '@rollup/rollup-darwin-arm64': 4.46.4 - '@rollup/rollup-darwin-x64': 4.46.4 - '@rollup/rollup-freebsd-arm64': 4.46.4 - '@rollup/rollup-freebsd-x64': 4.46.4 - '@rollup/rollup-linux-arm-gnueabihf': 4.46.4 - '@rollup/rollup-linux-arm-musleabihf': 4.46.4 - '@rollup/rollup-linux-arm64-gnu': 4.46.4 - '@rollup/rollup-linux-arm64-musl': 4.46.4 - '@rollup/rollup-linux-loongarch64-gnu': 4.46.4 - '@rollup/rollup-linux-ppc64-gnu': 4.46.4 - '@rollup/rollup-linux-riscv64-gnu': 4.46.4 - '@rollup/rollup-linux-riscv64-musl': 4.46.4 - '@rollup/rollup-linux-s390x-gnu': 4.46.4 - '@rollup/rollup-linux-x64-gnu': 4.46.4 - '@rollup/rollup-linux-x64-musl': 4.46.4 - '@rollup/rollup-win32-arm64-msvc': 4.46.4 - '@rollup/rollup-win32-ia32-msvc': 4.46.4 - '@rollup/rollup-win32-x64-msvc': 4.46.4 + '@rollup/rollup-android-arm-eabi': 4.48.0 + '@rollup/rollup-android-arm64': 4.48.0 + '@rollup/rollup-darwin-arm64': 4.48.0 + '@rollup/rollup-darwin-x64': 4.48.0 + '@rollup/rollup-freebsd-arm64': 4.48.0 + '@rollup/rollup-freebsd-x64': 4.48.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.48.0 + '@rollup/rollup-linux-arm-musleabihf': 4.48.0 + '@rollup/rollup-linux-arm64-gnu': 4.48.0 + '@rollup/rollup-linux-arm64-musl': 4.48.0 + '@rollup/rollup-linux-loongarch64-gnu': 4.48.0 + '@rollup/rollup-linux-ppc64-gnu': 4.48.0 + '@rollup/rollup-linux-riscv64-gnu': 4.48.0 + '@rollup/rollup-linux-riscv64-musl': 4.48.0 + '@rollup/rollup-linux-s390x-gnu': 4.48.0 + '@rollup/rollup-linux-x64-gnu': 4.48.0 + '@rollup/rollup-linux-x64-musl': 4.48.0 + '@rollup/rollup-win32-arm64-msvc': 4.48.0 + '@rollup/rollup-win32-ia32-msvc': 4.48.0 + '@rollup/rollup-win32-x64-msvc': 4.48.0 fsevents: 2.3.3 run-parallel@1.2.0: @@ -4748,7 +4748,7 @@ snapshots: fdir: 6.4.6(picomatch@4.0.2) picomatch: 4.0.2 postcss: 8.5.6 - rollup: 4.46.4 + rollup: 4.48.0 tinyglobby: 0.2.14 optionalDependencies: '@types/node': 22.15.32 From 4791d09a0af2495bd79804849a6c28c5d9fcba1d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 12:32:49 +0200 Subject: [PATCH 10/35] chore(deps): update dependency rollup to v4.48.1 (#14077) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- packages/api/package.json | 2 +- pnpm-lock.yaml | 190 +++++++++++++++++++------------------- 2 files changed, 96 insertions(+), 96 deletions(-) diff --git a/packages/api/package.json b/packages/api/package.json index d4cf28389..72300caae 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -55,7 +55,7 @@ "eslint-plugin-security": "3.0.1", "fast-glob": "3.3.3", "globals": "^16.2.0", - "rollup": "4.48.0", + "rollup": "4.48.1", "tslib": "^2.8.1", "typescript": "^5.8.3", "typescript-eslint": "^8.34.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 39159200a..b499c2b10 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,10 +63,10 @@ importers: version: 9.29.0 '@rollup/plugin-terser': specifier: 0.4.4 - version: 0.4.4(rollup@4.48.0) + version: 0.4.4(rollup@4.48.1) '@rollup/plugin-typescript': specifier: 12.1.4 - version: 12.1.4(rollup@4.48.0)(tslib@2.8.1)(typescript@5.8.3) + version: 12.1.4(rollup@4.48.1)(tslib@2.8.1)(typescript@5.8.3) '@types/eslint': specifier: ^9.6.1 version: 9.6.1 @@ -89,8 +89,8 @@ importers: specifier: ^16.2.0 version: 16.2.0 rollup: - specifier: 4.48.0 - version: 4.48.0 + specifier: 4.48.1 + version: 4.48.1 tslib: specifier: ^2.8.1 version: 2.8.1 @@ -1103,103 +1103,103 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.48.0': - resolution: {integrity: sha512-aVzKH922ogVAWkKiyKXorjYymz2084zrhrZRXtLrA5eEx5SO8Dj0c/4FpCHZyn7MKzhW2pW4tK28vVr+5oQ2xw==} + '@rollup/rollup-android-arm-eabi@4.48.1': + resolution: {integrity: sha512-rGmb8qoG/zdmKoYELCBwu7vt+9HxZ7Koos3pD0+sH5fR3u3Wb/jGcpnqxcnWsPEKDUyzeLSqksN8LJtgXjqBYw==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.48.0': - resolution: {integrity: sha512-diOdQuw43xTa1RddAFbhIA8toirSzFMcnIg8kvlzRbK26xqEnKJ/vqQnghTAajy2Dcy42v+GMPMo6jq67od+Dw==} + '@rollup/rollup-android-arm64@4.48.1': + resolution: {integrity: sha512-4e9WtTxrk3gu1DFE+imNJr4WsL13nWbD/Y6wQcyku5qadlKHY3OQ3LJ/INrrjngv2BJIHnIzbqMk1GTAC2P8yQ==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.48.0': - resolution: {integrity: sha512-QhR2KA18fPlJWFefySJPDYZELaVqIUVnYgAOdtJ+B/uH96CFg2l1TQpX19XpUMWUqMyIiyY45wje8K6F4w4/CA==} + '@rollup/rollup-darwin-arm64@4.48.1': + resolution: {integrity: sha512-+XjmyChHfc4TSs6WUQGmVf7Hkg8ferMAE2aNYYWjiLzAS/T62uOsdfnqv+GHRjq7rKRnYh4mwWb4Hz7h/alp8A==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.48.0': - resolution: {integrity: sha512-Q9RMXnQVJ5S1SYpNSTwXDpoQLgJ/fbInWOyjbCnnqTElEyeNvLAB3QvG5xmMQMhFN74bB5ZZJYkKaFPcOG8sGg==} + '@rollup/rollup-darwin-x64@4.48.1': + resolution: {integrity: sha512-upGEY7Ftw8M6BAJyGwnwMw91rSqXTcOKZnnveKrVWsMTF8/k5mleKSuh7D4v4IV1pLxKAk3Tbs0Lo9qYmii5mQ==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.48.0': - resolution: {integrity: sha512-3jzOhHWM8O8PSfyft+ghXZfBkZawQA0PUGtadKYxFqpcYlOYjTi06WsnYBsbMHLawr+4uWirLlbhcYLHDXR16w==} + '@rollup/rollup-freebsd-arm64@4.48.1': + resolution: {integrity: sha512-P9ViWakdoynYFUOZhqq97vBrhuvRLAbN/p2tAVJvhLb8SvN7rbBnJQcBu8e/rQts42pXGLVhfsAP0k9KXWa3nQ==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.48.0': - resolution: {integrity: sha512-NcD5uVUmE73C/TPJqf78hInZmiSBsDpz3iD5MF/BuB+qzm4ooF2S1HfeTChj5K4AV3y19FFPgxonsxiEpy8v/A==} + '@rollup/rollup-freebsd-x64@4.48.1': + resolution: {integrity: sha512-VLKIwIpnBya5/saccM8JshpbxfyJt0Dsli0PjXozHwbSVaHTvWXJH1bbCwPXxnMzU4zVEfgD1HpW3VQHomi2AQ==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.48.0': - resolution: {integrity: sha512-JWnrj8qZgLWRNHr7NbpdnrQ8kcg09EBBq8jVOjmtlB3c8C6IrynAJSMhMVGME4YfTJzIkJqvSUSVJRqkDnu/aA==} + '@rollup/rollup-linux-arm-gnueabihf@4.48.1': + resolution: {integrity: sha512-3zEuZsXfKaw8n/yF7t8N6NNdhyFw3s8xJTqjbTDXlipwrEHo4GtIKcMJr5Ed29leLpB9AugtAQpAHW0jvtKKaQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.48.0': - resolution: {integrity: sha512-9xu92F0TxuMH0tD6tG3+GtngwdgSf8Bnz+YcsPG91/r5Vgh5LNofO48jV55priA95p3c92FLmPM7CvsVlnSbGQ==} + '@rollup/rollup-linux-arm-musleabihf@4.48.1': + resolution: {integrity: sha512-leo9tOIlKrcBmmEypzunV/2w946JeLbTdDlwEZ7OnnsUyelZ72NMnT4B2vsikSgwQifjnJUbdXzuW4ToN1wV+Q==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.48.0': - resolution: {integrity: sha512-NLtvJB5YpWn7jlp1rJiY0s+G1Z1IVmkDuiywiqUhh96MIraC0n7XQc2SZ1CZz14shqkM+XN2UrfIo7JB6UufOA==} + '@rollup/rollup-linux-arm64-gnu@4.48.1': + resolution: {integrity: sha512-Vy/WS4z4jEyvnJm+CnPfExIv5sSKqZrUr98h03hpAMbE2aI0aD2wvK6GiSe8Gx2wGp3eD81cYDpLLBqNb2ydwQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.48.0': - resolution: {integrity: sha512-QJ4hCOnz2SXgCh+HmpvZkM+0NSGcZACyYS8DGbWn2PbmA0e5xUk4bIP8eqJyNXLtyB4gZ3/XyvKtQ1IFH671vQ==} + '@rollup/rollup-linux-arm64-musl@4.48.1': + resolution: {integrity: sha512-x5Kzn7XTwIssU9UYqWDB9VpLpfHYuXw5c6bJr4Mzv9kIv242vmJHbI5PJJEnmBYitUIfoMCODDhR7KoZLot2VQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.48.0': - resolution: {integrity: sha512-Pk0qlGJnhILdIC5zSKQnprFjrGmjfDM7TPZ0FKJxRkoo+kgMRAg4ps1VlTZf8u2vohSicLg7NP+cA5qE96PaFg==} + '@rollup/rollup-linux-loongarch64-gnu@4.48.1': + resolution: {integrity: sha512-yzCaBbwkkWt/EcgJOKDUdUpMHjhiZT/eDktOPWvSRpqrVE04p0Nd6EGV4/g7MARXXeOqstflqsKuXVM3H9wOIQ==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.48.0': - resolution: {integrity: sha512-/dNFc6rTpoOzgp5GKoYjT6uLo8okR/Chi2ECOmCZiS4oqh3mc95pThWma7Bgyk6/WTEvjDINpiBCuecPLOgBLQ==} + '@rollup/rollup-linux-ppc64-gnu@4.48.1': + resolution: {integrity: sha512-UK0WzWUjMAJccHIeOpPhPcKBqax7QFg47hwZTp6kiMhQHeOYJeaMwzeRZe1q5IiTKsaLnHu9s6toSYVUlZ2QtQ==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.48.0': - resolution: {integrity: sha512-YBwXsvsFI8CVA4ej+bJF2d9uAeIiSkqKSPQNn0Wyh4eMDY4wxuSp71BauPjQNCKK2tD2/ksJ7uhJ8X/PVY9bHQ==} + '@rollup/rollup-linux-riscv64-gnu@4.48.1': + resolution: {integrity: sha512-3NADEIlt+aCdCbWVZ7D3tBjBX1lHpXxcvrLt/kdXTiBrOds8APTdtk2yRL2GgmnSVeX4YS1JIf0imFujg78vpw==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.48.0': - resolution: {integrity: sha512-FI3Rr2aGAtl1aHzbkBIamsQyuauYtTF9SDUJ8n2wMXuuxwchC3QkumZa1TEXYIv/1AUp1a25Kwy6ONArvnyeVQ==} + '@rollup/rollup-linux-riscv64-musl@4.48.1': + resolution: {integrity: sha512-euuwm/QTXAMOcyiFCcrx0/S2jGvFlKJ2Iro8rsmYL53dlblp3LkUQVFzEidHhvIPPvcIsxDhl2wkBE+I6YVGzA==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.48.0': - resolution: {integrity: sha512-Dx7qH0/rvNNFmCcIRe1pyQ9/H0XO4v/f0SDoafwRYwc2J7bJZ5N4CHL/cdjamISZ5Cgnon6iazAVRFlxSoHQnQ==} + '@rollup/rollup-linux-s390x-gnu@4.48.1': + resolution: {integrity: sha512-w8mULUjmPdWLJgmTYJx/W6Qhln1a+yqvgwmGXcQl2vFBkWsKGUBRbtLRuKJUln8Uaimf07zgJNxOhHOvjSQmBQ==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.48.0': - resolution: {integrity: sha512-GUdZKTeKBq9WmEBzvFYuC88yk26vT66lQV8D5+9TgkfbewhLaTHRNATyzpQwwbHIfJvDJ3N9WJ90wK/uR3cy3Q==} + '@rollup/rollup-linux-x64-gnu@4.48.1': + resolution: {integrity: sha512-90taWXCWxTbClWuMZD0DKYohY1EovA+W5iytpE89oUPmT5O1HFdf8cuuVIylE6vCbrGdIGv85lVRzTcpTRZ+kA==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.48.0': - resolution: {integrity: sha512-ao58Adz/v14MWpQgYAb4a4h3fdw73DrDGtaiF7Opds5wNyEQwtO6M9dBh89nke0yoZzzaegq6J/EXs7eBebG8A==} + '@rollup/rollup-linux-x64-musl@4.48.1': + resolution: {integrity: sha512-2Gu29SkFh1FfTRuN1GR1afMuND2GKzlORQUP3mNMJbqdndOg7gNsa81JnORctazHRokiDzQ5+MLE5XYmZW5VWg==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.48.0': - resolution: {integrity: sha512-kpFno46bHtjZVdRIOxqaGeiABiToo2J+st7Yce+aiAoo1H0xPi2keyQIP04n2JjDVuxBN6bSz9R6RdTK5hIppw==} + '@rollup/rollup-win32-arm64-msvc@4.48.1': + resolution: {integrity: sha512-6kQFR1WuAO50bxkIlAVeIYsz3RUx+xymwhTo9j94dJ+kmHe9ly7muH23sdfWduD0BA8pD9/yhonUvAjxGh34jQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.48.0': - resolution: {integrity: sha512-rFYrk4lLk9YUTIeihnQMiwMr6gDhGGSbWThPEDfBoU/HdAtOzPXeexKi7yU8jO+LWRKnmqPN9NviHQf6GDwBcQ==} + '@rollup/rollup-win32-ia32-msvc@4.48.1': + resolution: {integrity: sha512-RUyZZ/mga88lMI3RlXFs4WQ7n3VyU07sPXmMG7/C1NOi8qisUg57Y7LRarqoGoAiopmGmChUhSwfpvQ3H5iGSQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.48.0': - resolution: {integrity: sha512-sq0hHLTgdtwOPDB5SJOuaoHyiP1qSwg+71TQWk8iDS04bW1wIE0oQ6otPiRj2ZvLYNASLMaTp8QRGUVZ+5OL5A==} + '@rollup/rollup-win32-x64-msvc@4.48.1': + resolution: {integrity: sha512-8a/caCUN4vkTChxkaIJcMtwIVcBhi4X2PQRoT+yCK3qRYaZ7cURrmJFL5Ux9H9RaMIXj9RuihckdmkBX3zZsgg==} cpu: [x64] os: [win32] @@ -2157,8 +2157,8 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rollup@4.48.0: - resolution: {integrity: sha512-BXHRqK1vyt9XVSEHZ9y7xdYtuYbwVod2mLwOMFP7t/Eqoc1pHRlG/WdV2qNeNvZHRQdLedaFycljaYYM96RqJQ==} + rollup@4.48.1: + resolution: {integrity: sha512-jVG20NvbhTYDkGAty2/Yh7HK6/q3DGSRH4o8ALKGArmMuaauM9kLfoMZ+WliPwA5+JHr2lTn3g557FxBV87ifg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -3312,89 +3312,89 @@ snapshots: dependencies: quansync: 0.2.10 - '@rollup/plugin-terser@0.4.4(rollup@4.48.0)': + '@rollup/plugin-terser@0.4.4(rollup@4.48.1)': dependencies: serialize-javascript: 6.0.2 smob: 1.5.0 terser: 5.43.1 optionalDependencies: - rollup: 4.48.0 + rollup: 4.48.1 - '@rollup/plugin-typescript@12.1.4(rollup@4.48.0)(tslib@2.8.1)(typescript@5.8.3)': + '@rollup/plugin-typescript@12.1.4(rollup@4.48.1)(tslib@2.8.1)(typescript@5.8.3)': dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.48.0) + '@rollup/pluginutils': 5.2.0(rollup@4.48.1) resolve: 1.22.10 typescript: 5.8.3 optionalDependencies: - rollup: 4.48.0 + rollup: 4.48.1 tslib: 2.8.1 - '@rollup/pluginutils@5.2.0(rollup@4.48.0)': + '@rollup/pluginutils@5.2.0(rollup@4.48.1)': dependencies: '@types/estree': 1.0.8 estree-walker: 2.0.2 picomatch: 4.0.2 optionalDependencies: - rollup: 4.48.0 + rollup: 4.48.1 - '@rollup/rollup-android-arm-eabi@4.48.0': + '@rollup/rollup-android-arm-eabi@4.48.1': optional: true - '@rollup/rollup-android-arm64@4.48.0': + '@rollup/rollup-android-arm64@4.48.1': optional: true - '@rollup/rollup-darwin-arm64@4.48.0': + '@rollup/rollup-darwin-arm64@4.48.1': optional: true - '@rollup/rollup-darwin-x64@4.48.0': + '@rollup/rollup-darwin-x64@4.48.1': optional: true - '@rollup/rollup-freebsd-arm64@4.48.0': + '@rollup/rollup-freebsd-arm64@4.48.1': optional: true - '@rollup/rollup-freebsd-x64@4.48.0': + '@rollup/rollup-freebsd-x64@4.48.1': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.48.0': + '@rollup/rollup-linux-arm-gnueabihf@4.48.1': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.48.0': + '@rollup/rollup-linux-arm-musleabihf@4.48.1': optional: true - '@rollup/rollup-linux-arm64-gnu@4.48.0': + '@rollup/rollup-linux-arm64-gnu@4.48.1': optional: true - '@rollup/rollup-linux-arm64-musl@4.48.0': + '@rollup/rollup-linux-arm64-musl@4.48.1': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.48.0': + '@rollup/rollup-linux-loongarch64-gnu@4.48.1': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.48.0': + '@rollup/rollup-linux-ppc64-gnu@4.48.1': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.48.0': + '@rollup/rollup-linux-riscv64-gnu@4.48.1': optional: true - '@rollup/rollup-linux-riscv64-musl@4.48.0': + '@rollup/rollup-linux-riscv64-musl@4.48.1': optional: true - '@rollup/rollup-linux-s390x-gnu@4.48.0': + '@rollup/rollup-linux-s390x-gnu@4.48.1': optional: true - '@rollup/rollup-linux-x64-gnu@4.48.0': + '@rollup/rollup-linux-x64-gnu@4.48.1': optional: true - '@rollup/rollup-linux-x64-musl@4.48.0': + '@rollup/rollup-linux-x64-musl@4.48.1': optional: true - '@rollup/rollup-win32-arm64-msvc@4.48.0': + '@rollup/rollup-win32-arm64-msvc@4.48.1': optional: true - '@rollup/rollup-win32-ia32-msvc@4.48.0': + '@rollup/rollup-win32-ia32-msvc@4.48.1': optional: true - '@rollup/rollup-win32-x64-msvc@4.48.0': + '@rollup/rollup-win32-x64-msvc@4.48.1': optional: true '@sveltejs/acorn-typescript@1.0.5(acorn@8.15.0)': @@ -4448,30 +4448,30 @@ snapshots: reusify@1.1.0: {} - rollup@4.48.0: + rollup@4.48.1: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.48.0 - '@rollup/rollup-android-arm64': 4.48.0 - '@rollup/rollup-darwin-arm64': 4.48.0 - '@rollup/rollup-darwin-x64': 4.48.0 - '@rollup/rollup-freebsd-arm64': 4.48.0 - '@rollup/rollup-freebsd-x64': 4.48.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.48.0 - '@rollup/rollup-linux-arm-musleabihf': 4.48.0 - '@rollup/rollup-linux-arm64-gnu': 4.48.0 - '@rollup/rollup-linux-arm64-musl': 4.48.0 - '@rollup/rollup-linux-loongarch64-gnu': 4.48.0 - '@rollup/rollup-linux-ppc64-gnu': 4.48.0 - '@rollup/rollup-linux-riscv64-gnu': 4.48.0 - '@rollup/rollup-linux-riscv64-musl': 4.48.0 - '@rollup/rollup-linux-s390x-gnu': 4.48.0 - '@rollup/rollup-linux-x64-gnu': 4.48.0 - '@rollup/rollup-linux-x64-musl': 4.48.0 - '@rollup/rollup-win32-arm64-msvc': 4.48.0 - '@rollup/rollup-win32-ia32-msvc': 4.48.0 - '@rollup/rollup-win32-x64-msvc': 4.48.0 + '@rollup/rollup-android-arm-eabi': 4.48.1 + '@rollup/rollup-android-arm64': 4.48.1 + '@rollup/rollup-darwin-arm64': 4.48.1 + '@rollup/rollup-darwin-x64': 4.48.1 + '@rollup/rollup-freebsd-arm64': 4.48.1 + '@rollup/rollup-freebsd-x64': 4.48.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.48.1 + '@rollup/rollup-linux-arm-musleabihf': 4.48.1 + '@rollup/rollup-linux-arm64-gnu': 4.48.1 + '@rollup/rollup-linux-arm64-musl': 4.48.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.48.1 + '@rollup/rollup-linux-ppc64-gnu': 4.48.1 + '@rollup/rollup-linux-riscv64-gnu': 4.48.1 + '@rollup/rollup-linux-riscv64-musl': 4.48.1 + '@rollup/rollup-linux-s390x-gnu': 4.48.1 + '@rollup/rollup-linux-x64-gnu': 4.48.1 + '@rollup/rollup-linux-x64-musl': 4.48.1 + '@rollup/rollup-win32-arm64-msvc': 4.48.1 + '@rollup/rollup-win32-ia32-msvc': 4.48.1 + '@rollup/rollup-win32-x64-msvc': 4.48.1 fsevents: 2.3.3 run-parallel@1.2.0: @@ -4748,7 +4748,7 @@ snapshots: fdir: 6.4.6(picomatch@4.0.2) picomatch: 4.0.2 postcss: 8.5.6 - rollup: 4.48.0 + rollup: 4.48.1 tinyglobby: 0.2.14 optionalDependencies: '@types/node': 22.15.32 From 0ac89d3b6c8c4a4826a4c42726e4f4a8941b3fde Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Mon, 25 Aug 2025 14:04:43 +0200 Subject: [PATCH 11/35] chore(deps): Update cargo-mobile2 for ios 18.6 sim support (#14078) --- .changes/cargo-mobile2.md | 6 ++++++ Cargo.lock | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .changes/cargo-mobile2.md diff --git a/.changes/cargo-mobile2.md b/.changes/cargo-mobile2.md new file mode 100644 index 000000000..b21dd85e5 --- /dev/null +++ b/.changes/cargo-mobile2.md @@ -0,0 +1,6 @@ +--- +tauri-cli: "patch:bug" +"@tauri-apps/cli": "patch:bug" +--- + +Updated `cargo-mobile2` to allow running on iOS simulators that have a higher version than the XCode SDK. This fixes compatiblity issues with Apple's recent "iOS 18.5 + iOS 18.6 Simulator" platform support component. diff --git a/Cargo.lock b/Cargo.lock index 1dcd17693..98d9c94f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1055,9 +1055,9 @@ dependencies = [ [[package]] name = "cargo-mobile2" -version = "0.20.2" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2e0347234eb5a7b47eb66d33dc18560a628f031dffe58c37a7efe44b53e6f9" +checksum = "d93c1021dbbc971a4801008e7faf1c255b56c8317a2a10970703ee46caa3343e" dependencies = [ "colored", "core-foundation 0.10.0", @@ -5816,7 +5816,7 @@ dependencies = [ "aes-gcm", "aes-kw", "argon2", - "base64 0.22.1", + "base64 0.21.7", "bitfield", "block-padding", "blowfish", From e81635aa3dc5a8220d579c9a6be30332fc4ceda0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 14:25:58 +0200 Subject: [PATCH 12/35] apply version updates (#14079) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changes/cargo-mobile2.md | 6 ------ Cargo.lock | 2 +- crates/tauri-cli/CHANGELOG.md | 6 ++++++ crates/tauri-cli/Cargo.toml | 2 +- crates/tauri-cli/metadata-v2.json | 2 +- packages/cli/CHANGELOG.md | 10 ++++++++++ packages/cli/package.json | 2 +- 7 files changed, 20 insertions(+), 10 deletions(-) delete mode 100644 .changes/cargo-mobile2.md diff --git a/.changes/cargo-mobile2.md b/.changes/cargo-mobile2.md deleted file mode 100644 index b21dd85e5..000000000 --- a/.changes/cargo-mobile2.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -tauri-cli: "patch:bug" -"@tauri-apps/cli": "patch:bug" ---- - -Updated `cargo-mobile2` to allow running on iOS simulators that have a higher version than the XCode SDK. This fixes compatiblity issues with Apple's recent "iOS 18.5 + iOS 18.6 Simulator" platform support component. diff --git a/Cargo.lock b/Cargo.lock index 98d9c94f8..d42695764 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8613,7 +8613,7 @@ dependencies = [ [[package]] name = "tauri-cli" -version = "2.8.1" +version = "2.8.2" dependencies = [ "anyhow", "ar", diff --git a/crates/tauri-cli/CHANGELOG.md b/crates/tauri-cli/CHANGELOG.md index 7e5ed4e52..b2babeb3c 100644 --- a/crates/tauri-cli/CHANGELOG.md +++ b/crates/tauri-cli/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[2.8.2] + +### Bug Fixes + +- [`0ac89d3b6`](https://www.github.com/tauri-apps/tauri/commit/0ac89d3b6c8c4a4826a4c42726e4f4a8941b3fde) ([#14078](https://www.github.com/tauri-apps/tauri/pull/14078) by [@FabianLars](https://www.github.com/tauri-apps/tauri/../../FabianLars)) Updated `cargo-mobile2` to allow running on iOS simulators that have a higher version than the XCode SDK. This fixes compatiblity issues with Apple's recent "iOS 18.5 + iOS 18.6 Simulator" platform support component. + ## \[2.8.1] ### Dependencies diff --git a/crates/tauri-cli/Cargo.toml b/crates/tauri-cli/Cargo.toml index 25cfef8cd..884cc566a 100644 --- a/crates/tauri-cli/Cargo.toml +++ b/crates/tauri-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-cli" -version = "2.8.1" +version = "2.8.2" authors = ["Tauri Programme within The Commons Conservancy"] edition = "2021" rust-version = "1.77.2" diff --git a/crates/tauri-cli/metadata-v2.json b/crates/tauri-cli/metadata-v2.json index 3354c1747..3014061ec 100644 --- a/crates/tauri-cli/metadata-v2.json +++ b/crates/tauri-cli/metadata-v2.json @@ -1,6 +1,6 @@ { "cli.js": { - "version": "2.8.2", + "version": "2.8.3", "node": ">= 10.0.0" }, "tauri": "2.8.3", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index a3008f9bc..064a7b141 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## \[2.8.3] + +### Bug Fixes + +- [`0ac89d3b6`](https://www.github.com/tauri-apps/tauri/commit/0ac89d3b6c8c4a4826a4c42726e4f4a8941b3fde) ([#14078](https://www.github.com/tauri-apps/tauri/pull/14078) by [@FabianLars](https://www.github.com/tauri-apps/tauri/../../FabianLars)) Updated `cargo-mobile2` to allow running on iOS simulators that have a higher version than the XCode SDK. This fixes compatiblity issues with Apple's recent "iOS 18.5 + iOS 18.6 Simulator" platform support component. + +### Dependencies + +- Upgraded to `tauri-cli@2.8.2` + ## \[2.8.2] ### Dependencies diff --git a/packages/cli/package.json b/packages/cli/package.json index ac87efb74..7e83e8faa 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/cli", - "version": "2.8.2", + "version": "2.8.3", "description": "Command line interface for building Tauri apps", "funding": { "type": "opencollective", From 03e7c1193208716170f120a1d4a39cea0bc21064 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Mon, 25 Aug 2025 10:03:35 -0300 Subject: [PATCH 13/35] fix(tauri-runtime-wry): ignore about:blank initial URL (#14080) * fix(tauri-runtime-wry): ignore about:blank initial URL fixes a macOS warning when a navigation handler is registered and you choose to create a new window on the on_new_window hook - in this case we shouldn't perform the initial navigation since the URL is provided by the webview configuration from the hook * change tag * bump min wry --- .changes/about-blank-ignore.md | 6 ++++++ Cargo.lock | 6 +++--- crates/tauri-runtime-wry/Cargo.toml | 2 +- crates/tauri-runtime-wry/src/lib.rs | 5 ++++- 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 .changes/about-blank-ignore.md diff --git a/.changes/about-blank-ignore.md b/.changes/about-blank-ignore.md new file mode 100644 index 000000000..9f5c8eef8 --- /dev/null +++ b/.changes/about-blank-ignore.md @@ -0,0 +1,6 @@ +--- +"tauri-runtime-wry": patch:bug +"tauri": patch:bug +--- + +Ignore initial navigation to `about:blank` so `on_new_window` does not give a warning on first navigation on macOS. diff --git a/Cargo.lock b/Cargo.lock index d42695764..705f58edb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5816,7 +5816,7 @@ dependencies = [ "aes-gcm", "aes-kw", "argon2", - "base64 0.21.7", + "base64 0.22.1", "bitfield", "block-padding", "blowfish", @@ -10943,9 +10943,9 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "wry" -version = "0.53.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5698e50a589268aec06d2219f48b143222f7b5ad9aa690118b8dce0a8dcac574" +checksum = "e3b6763512fe4b51c80b3ce9b50939d682acb4de335dfabbdb20d7a2642199b7" dependencies = [ "base64 0.22.1", "block2 0.6.0", diff --git a/crates/tauri-runtime-wry/Cargo.toml b/crates/tauri-runtime-wry/Cargo.toml index 97c81bfbc..63841d7c9 100644 --- a/crates/tauri-runtime-wry/Cargo.toml +++ b/crates/tauri-runtime-wry/Cargo.toml @@ -17,7 +17,7 @@ rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"] [dependencies] -wry = { version = "0.53.1", default-features = false, features = [ +wry = { version = "0.53.2", default-features = false, features = [ "drag-drop", "protocol", "os-webview", diff --git a/crates/tauri-runtime-wry/src/lib.rs b/crates/tauri-runtime-wry/src/lib.rs index 52d9eb72e..a5b6a1188 100644 --- a/crates/tauri-runtime-wry/src/lib.rs +++ b/crates/tauri-runtime-wry/src/lib.rs @@ -4578,13 +4578,16 @@ You may have it installed on another user account, but it is not available for t let mut webview_builder = WebViewBuilder::new_with_web_context(&mut web_context.inner) .with_id(&label) .with_focused(webview_attributes.focus) - .with_url(&url) .with_transparent(webview_attributes.transparent) .with_accept_first_mouse(webview_attributes.accept_first_mouse) .with_incognito(webview_attributes.incognito) .with_clipboard(webview_attributes.clipboard) .with_hotkeys_zoom(webview_attributes.zoom_hotkeys_enabled); + if url != "about:blank" { + webview_builder = webview_builder.with_url(&url); + } + #[cfg(target_os = "macos")] if let Some(webview_configuration) = webview_attributes.webview_configuration { webview_builder = webview_builder.with_webview_configuration(webview_configuration); From 16348ac2bd4aa2296398ef626d783fcf61461113 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 10:30:08 -0300 Subject: [PATCH 14/35] apply version updates (#14081) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changes/about-blank-ignore.md | 6 ------ Cargo.lock | 10 +++++----- crates/tauri-cli/config.schema.json | 2 +- crates/tauri-cli/metadata-v2.json | 2 +- crates/tauri-runtime-wry/CHANGELOG.md | 6 ++++++ crates/tauri-runtime-wry/Cargo.toml | 2 +- .../tauri-schema-generator/schemas/config.schema.json | 2 +- crates/tauri/CHANGELOG.md | 10 ++++++++++ crates/tauri/Cargo.toml | 4 ++-- 9 files changed, 27 insertions(+), 17 deletions(-) delete mode 100644 .changes/about-blank-ignore.md diff --git a/.changes/about-blank-ignore.md b/.changes/about-blank-ignore.md deleted file mode 100644 index 9f5c8eef8..000000000 --- a/.changes/about-blank-ignore.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri-runtime-wry": patch:bug -"tauri": patch:bug ---- - -Ignore initial navigation to `about:blank` so `on_new_window` does not give a warning on first navigation on macOS. diff --git a/Cargo.lock b/Cargo.lock index 705f58edb..7a102a72e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1319,7 +1319,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] @@ -4311,7 +4311,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -8484,7 +8484,7 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.8.3" +version = "2.8.4" dependencies = [ "anyhow", "bytes", @@ -8872,7 +8872,7 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.8.0" +version = "2.8.1" dependencies = [ "gtk", "http 1.3.1", @@ -10311,7 +10311,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index 27f3e661f..c036e24fd 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://schema.tauri.app/config/2.8.3", + "$id": "https://schema.tauri.app/config/2.8.4", "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", diff --git a/crates/tauri-cli/metadata-v2.json b/crates/tauri-cli/metadata-v2.json index 3014061ec..7e9ac818c 100644 --- a/crates/tauri-cli/metadata-v2.json +++ b/crates/tauri-cli/metadata-v2.json @@ -3,7 +3,7 @@ "version": "2.8.3", "node": ">= 10.0.0" }, - "tauri": "2.8.3", + "tauri": "2.8.4", "tauri-build": "2.4.0", "tauri-plugin": "2.4.0" } diff --git a/crates/tauri-runtime-wry/CHANGELOG.md b/crates/tauri-runtime-wry/CHANGELOG.md index a7d22c450..c53d32e43 100644 --- a/crates/tauri-runtime-wry/CHANGELOG.md +++ b/crates/tauri-runtime-wry/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[2.8.1] + +### Bug Fixes + +- [`03e7c1193`](https://www.github.com/tauri-apps/tauri/commit/03e7c1193208716170f120a1d4a39cea0bc21064) ([#14080](https://www.github.com/tauri-apps/tauri/pull/14080) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Ignore initial navigation to `about:blank` so `on_new_window` does not give a warning on first navigation on macOS. + ## \[2.8.0] ### New Features diff --git a/crates/tauri-runtime-wry/Cargo.toml b/crates/tauri-runtime-wry/Cargo.toml index 63841d7c9..6271f64dd 100644 --- a/crates/tauri-runtime-wry/Cargo.toml +++ b/crates/tauri-runtime-wry/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-runtime-wry" -version = "2.8.0" +version = "2.8.1" description = "Wry bindings to the Tauri runtime" exclude = ["CHANGELOG.md", "/target"] readme = "README.md" diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index 27f3e661f..c036e24fd 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://schema.tauri.app/config/2.8.3", + "$id": "https://schema.tauri.app/config/2.8.4", "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", diff --git a/crates/tauri/CHANGELOG.md b/crates/tauri/CHANGELOG.md index 25d5ad356..01974c2c5 100644 --- a/crates/tauri/CHANGELOG.md +++ b/crates/tauri/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## \[2.8.4] + +### Bug Fixes + +- [`03e7c1193`](https://www.github.com/tauri-apps/tauri/commit/03e7c1193208716170f120a1d4a39cea0bc21064) ([#14080](https://www.github.com/tauri-apps/tauri/pull/14080) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Ignore initial navigation to `about:blank` so `on_new_window` does not give a warning on first navigation on macOS. + +### Dependencies + +- Upgraded to `tauri-runtime-wry@2.8.1` + ## \[2.8.3] ### Bug Fixes diff --git a/crates/tauri/Cargo.toml b/crates/tauri/Cargo.toml index 2fdec8c24..b0a4a5966 100644 --- a/crates/tauri/Cargo.toml +++ b/crates/tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri" -version = "2.8.3" +version = "2.8.4" description = "Make tiny, secure apps for all desktop platforms with Tauri" exclude = ["/test", "/.scripts", "CHANGELOG.md", "/target"] readme = "README.md" @@ -61,7 +61,7 @@ tauri-macros = { version = "2.4.0", path = "../tauri-macros" } tauri-utils = { version = "2.7.0", features = [ "resources", ], path = "../tauri-utils" } -tauri-runtime-wry = { version = "2.8.0", path = "../tauri-runtime-wry", default-features = false, optional = true } +tauri-runtime-wry = { version = "2.8.1", path = "../tauri-runtime-wry", default-features = false, optional = true } getrandom = "0.3" serde_repr = "0.1" http = "1" From df61fac2b50d4027e333d0287030b1b6cb411caf Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Mon, 25 Aug 2025 10:32:46 -0300 Subject: [PATCH 15/35] fix(ci): bump tauri-cli to 2.8.3 to match @tauri-apps/cli --- Cargo.lock | 2 +- crates/tauri-cli/CHANGELOG.md | 2 +- crates/tauri-cli/Cargo.toml | 2 +- packages/cli/CHANGELOG.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7a102a72e..874481561 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8613,7 +8613,7 @@ dependencies = [ [[package]] name = "tauri-cli" -version = "2.8.2" +version = "2.8.3" dependencies = [ "anyhow", "ar", diff --git a/crates/tauri-cli/CHANGELOG.md b/crates/tauri-cli/CHANGELOG.md index b2babeb3c..65a67d0e7 100644 --- a/crates/tauri-cli/CHANGELOG.md +++ b/crates/tauri-cli/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## \[2.8.2] +## \[2.8.3] ### Bug Fixes diff --git a/crates/tauri-cli/Cargo.toml b/crates/tauri-cli/Cargo.toml index 884cc566a..8fd5f60f7 100644 --- a/crates/tauri-cli/Cargo.toml +++ b/crates/tauri-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-cli" -version = "2.8.2" +version = "2.8.3" authors = ["Tauri Programme within The Commons Conservancy"] edition = "2021" rust-version = "1.77.2" diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 064a7b141..cfc07d4cc 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -8,7 +8,7 @@ ### Dependencies -- Upgraded to `tauri-cli@2.8.2` +- Upgraded to `tauri-cli@2.8.3` ## \[2.8.2] From 755eb33d1c865b1d43c8735bf913d18a316c37c1 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Mon, 25 Aug 2025 16:19:44 +0200 Subject: [PATCH 16/35] docs: use get_webview_window in example (#14082) --- crates/tauri/src/app.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/tauri/src/app.rs b/crates/tauri/src/app.rs index 3451306a4..06a3abe44 100644 --- a/crates/tauri/src/app.rs +++ b/crates/tauri/src/app.rs @@ -1632,7 +1632,7 @@ impl Builder { use tauri::Manager; tauri::Builder::default() .setup(|app| { - let main_window = app.get_window("main").unwrap(); + let main_window = app.get_webview_window("main").unwrap(); main_window.set_title("Tauri!")?; Ok(()) }); From 9a35a616f540bce1a55c1e296ad087ab1915a635 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 27 Aug 2025 23:27:02 +0800 Subject: [PATCH 17/35] chore(deps): update dependency rollup to v4.49.0 (#14098) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- packages/api/package.json | 2 +- pnpm-lock.yaml | 190 +++++++++++++++++++------------------- 2 files changed, 96 insertions(+), 96 deletions(-) diff --git a/packages/api/package.json b/packages/api/package.json index 72300caae..20ed0f8c1 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -55,7 +55,7 @@ "eslint-plugin-security": "3.0.1", "fast-glob": "3.3.3", "globals": "^16.2.0", - "rollup": "4.48.1", + "rollup": "4.49.0", "tslib": "^2.8.1", "typescript": "^5.8.3", "typescript-eslint": "^8.34.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b499c2b10..4c93d9f94 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,10 +63,10 @@ importers: version: 9.29.0 '@rollup/plugin-terser': specifier: 0.4.4 - version: 0.4.4(rollup@4.48.1) + version: 0.4.4(rollup@4.49.0) '@rollup/plugin-typescript': specifier: 12.1.4 - version: 12.1.4(rollup@4.48.1)(tslib@2.8.1)(typescript@5.8.3) + version: 12.1.4(rollup@4.49.0)(tslib@2.8.1)(typescript@5.8.3) '@types/eslint': specifier: ^9.6.1 version: 9.6.1 @@ -89,8 +89,8 @@ importers: specifier: ^16.2.0 version: 16.2.0 rollup: - specifier: 4.48.1 - version: 4.48.1 + specifier: 4.49.0 + version: 4.49.0 tslib: specifier: ^2.8.1 version: 2.8.1 @@ -1103,103 +1103,103 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.48.1': - resolution: {integrity: sha512-rGmb8qoG/zdmKoYELCBwu7vt+9HxZ7Koos3pD0+sH5fR3u3Wb/jGcpnqxcnWsPEKDUyzeLSqksN8LJtgXjqBYw==} + '@rollup/rollup-android-arm-eabi@4.49.0': + resolution: {integrity: sha512-rlKIeL854Ed0e09QGYFlmDNbka6I3EQFw7iZuugQjMb11KMpJCLPFL4ZPbMfaEhLADEL1yx0oujGkBQ7+qW3eA==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.48.1': - resolution: {integrity: sha512-4e9WtTxrk3gu1DFE+imNJr4WsL13nWbD/Y6wQcyku5qadlKHY3OQ3LJ/INrrjngv2BJIHnIzbqMk1GTAC2P8yQ==} + '@rollup/rollup-android-arm64@4.49.0': + resolution: {integrity: sha512-cqPpZdKUSQYRtLLr6R4X3sD4jCBO1zUmeo3qrWBCqYIeH8Q3KRL4F3V7XJ2Rm8/RJOQBZuqzQGWPjjvFUcYa/w==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.48.1': - resolution: {integrity: sha512-+XjmyChHfc4TSs6WUQGmVf7Hkg8ferMAE2aNYYWjiLzAS/T62uOsdfnqv+GHRjq7rKRnYh4mwWb4Hz7h/alp8A==} + '@rollup/rollup-darwin-arm64@4.49.0': + resolution: {integrity: sha512-99kMMSMQT7got6iYX3yyIiJfFndpojBmkHfTc1rIje8VbjhmqBXE+nb7ZZP3A5skLyujvT0eIUCUsxAe6NjWbw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.48.1': - resolution: {integrity: sha512-upGEY7Ftw8M6BAJyGwnwMw91rSqXTcOKZnnveKrVWsMTF8/k5mleKSuh7D4v4IV1pLxKAk3Tbs0Lo9qYmii5mQ==} + '@rollup/rollup-darwin-x64@4.49.0': + resolution: {integrity: sha512-y8cXoD3wdWUDpjOLMKLx6l+NFz3NlkWKcBCBfttUn+VGSfgsQ5o/yDUGtzE9HvsodkP0+16N0P4Ty1VuhtRUGg==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.48.1': - resolution: {integrity: sha512-P9ViWakdoynYFUOZhqq97vBrhuvRLAbN/p2tAVJvhLb8SvN7rbBnJQcBu8e/rQts42pXGLVhfsAP0k9KXWa3nQ==} + '@rollup/rollup-freebsd-arm64@4.49.0': + resolution: {integrity: sha512-3mY5Pr7qv4GS4ZvWoSP8zha8YoiqrU+e0ViPvB549jvliBbdNLrg2ywPGkgLC3cmvN8ya3za+Q2xVyT6z+vZqA==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.48.1': - resolution: {integrity: sha512-VLKIwIpnBya5/saccM8JshpbxfyJt0Dsli0PjXozHwbSVaHTvWXJH1bbCwPXxnMzU4zVEfgD1HpW3VQHomi2AQ==} + '@rollup/rollup-freebsd-x64@4.49.0': + resolution: {integrity: sha512-C9KzzOAQU5gU4kG8DTk+tjdKjpWhVWd5uVkinCwwFub2m7cDYLOdtXoMrExfeBmeRy9kBQMkiyJ+HULyF1yj9w==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.48.1': - resolution: {integrity: sha512-3zEuZsXfKaw8n/yF7t8N6NNdhyFw3s8xJTqjbTDXlipwrEHo4GtIKcMJr5Ed29leLpB9AugtAQpAHW0jvtKKaQ==} + '@rollup/rollup-linux-arm-gnueabihf@4.49.0': + resolution: {integrity: sha512-OVSQgEZDVLnTbMq5NBs6xkmz3AADByCWI4RdKSFNlDsYXdFtlxS59J+w+LippJe8KcmeSSM3ba+GlsM9+WwC1w==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.48.1': - resolution: {integrity: sha512-leo9tOIlKrcBmmEypzunV/2w946JeLbTdDlwEZ7OnnsUyelZ72NMnT4B2vsikSgwQifjnJUbdXzuW4ToN1wV+Q==} + '@rollup/rollup-linux-arm-musleabihf@4.49.0': + resolution: {integrity: sha512-ZnfSFA7fDUHNa4P3VwAcfaBLakCbYaxCk0jUnS3dTou9P95kwoOLAMlT3WmEJDBCSrOEFFV0Y1HXiwfLYJuLlA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.48.1': - resolution: {integrity: sha512-Vy/WS4z4jEyvnJm+CnPfExIv5sSKqZrUr98h03hpAMbE2aI0aD2wvK6GiSe8Gx2wGp3eD81cYDpLLBqNb2ydwQ==} + '@rollup/rollup-linux-arm64-gnu@4.49.0': + resolution: {integrity: sha512-Z81u+gfrobVK2iV7GqZCBfEB1y6+I61AH466lNK+xy1jfqFLiQ9Qv716WUM5fxFrYxwC7ziVdZRU9qvGHkYIJg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.48.1': - resolution: {integrity: sha512-x5Kzn7XTwIssU9UYqWDB9VpLpfHYuXw5c6bJr4Mzv9kIv242vmJHbI5PJJEnmBYitUIfoMCODDhR7KoZLot2VQ==} + '@rollup/rollup-linux-arm64-musl@4.49.0': + resolution: {integrity: sha512-zoAwS0KCXSnTp9NH/h9aamBAIve0DXeYpll85shf9NJ0URjSTzzS+Z9evmolN+ICfD3v8skKUPyk2PO0uGdFqg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.48.1': - resolution: {integrity: sha512-yzCaBbwkkWt/EcgJOKDUdUpMHjhiZT/eDktOPWvSRpqrVE04p0Nd6EGV4/g7MARXXeOqstflqsKuXVM3H9wOIQ==} + '@rollup/rollup-linux-loongarch64-gnu@4.49.0': + resolution: {integrity: sha512-2QyUyQQ1ZtwZGiq0nvODL+vLJBtciItC3/5cYN8ncDQcv5avrt2MbKt1XU/vFAJlLta5KujqyHdYtdag4YEjYQ==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.48.1': - resolution: {integrity: sha512-UK0WzWUjMAJccHIeOpPhPcKBqax7QFg47hwZTp6kiMhQHeOYJeaMwzeRZe1q5IiTKsaLnHu9s6toSYVUlZ2QtQ==} + '@rollup/rollup-linux-ppc64-gnu@4.49.0': + resolution: {integrity: sha512-k9aEmOWt+mrMuD3skjVJSSxHckJp+SiFzFG+v8JLXbc/xi9hv2icSkR3U7uQzqy+/QbbYY7iNB9eDTwrELo14g==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.48.1': - resolution: {integrity: sha512-3NADEIlt+aCdCbWVZ7D3tBjBX1lHpXxcvrLt/kdXTiBrOds8APTdtk2yRL2GgmnSVeX4YS1JIf0imFujg78vpw==} + '@rollup/rollup-linux-riscv64-gnu@4.49.0': + resolution: {integrity: sha512-rDKRFFIWJ/zJn6uk2IdYLc09Z7zkE5IFIOWqpuU0o6ZpHcdniAyWkwSUWE/Z25N/wNDmFHHMzin84qW7Wzkjsw==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.48.1': - resolution: {integrity: sha512-euuwm/QTXAMOcyiFCcrx0/S2jGvFlKJ2Iro8rsmYL53dlblp3LkUQVFzEidHhvIPPvcIsxDhl2wkBE+I6YVGzA==} + '@rollup/rollup-linux-riscv64-musl@4.49.0': + resolution: {integrity: sha512-FkkhIY/hYFVnOzz1WeV3S9Bd1h0hda/gRqvZCMpHWDHdiIHn6pqsY3b5eSbvGccWHMQ1uUzgZTKS4oGpykf8Tw==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.48.1': - resolution: {integrity: sha512-w8mULUjmPdWLJgmTYJx/W6Qhln1a+yqvgwmGXcQl2vFBkWsKGUBRbtLRuKJUln8Uaimf07zgJNxOhHOvjSQmBQ==} + '@rollup/rollup-linux-s390x-gnu@4.49.0': + resolution: {integrity: sha512-gRf5c+A7QiOG3UwLyOOtyJMD31JJhMjBvpfhAitPAoqZFcOeK3Kc1Veg1z/trmt+2P6F/biT02fU19GGTS529A==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.48.1': - resolution: {integrity: sha512-90taWXCWxTbClWuMZD0DKYohY1EovA+W5iytpE89oUPmT5O1HFdf8cuuVIylE6vCbrGdIGv85lVRzTcpTRZ+kA==} + '@rollup/rollup-linux-x64-gnu@4.49.0': + resolution: {integrity: sha512-BR7+blScdLW1h/2hB/2oXM+dhTmpW3rQt1DeSiCP9mc2NMMkqVgjIN3DDsNpKmezffGC9R8XKVOLmBkRUcK/sA==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.48.1': - resolution: {integrity: sha512-2Gu29SkFh1FfTRuN1GR1afMuND2GKzlORQUP3mNMJbqdndOg7gNsa81JnORctazHRokiDzQ5+MLE5XYmZW5VWg==} + '@rollup/rollup-linux-x64-musl@4.49.0': + resolution: {integrity: sha512-hDMOAe+6nX3V5ei1I7Au3wcr9h3ktKzDvF2ne5ovX8RZiAHEtX1A5SNNk4zt1Qt77CmnbqT+upb/umzoPMWiPg==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.48.1': - resolution: {integrity: sha512-6kQFR1WuAO50bxkIlAVeIYsz3RUx+xymwhTo9j94dJ+kmHe9ly7muH23sdfWduD0BA8pD9/yhonUvAjxGh34jQ==} + '@rollup/rollup-win32-arm64-msvc@4.49.0': + resolution: {integrity: sha512-wkNRzfiIGaElC9kXUT+HLx17z7D0jl+9tGYRKwd8r7cUqTL7GYAvgUY++U2hK6Ar7z5Z6IRRoWC8kQxpmM7TDA==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.48.1': - resolution: {integrity: sha512-RUyZZ/mga88lMI3RlXFs4WQ7n3VyU07sPXmMG7/C1NOi8qisUg57Y7LRarqoGoAiopmGmChUhSwfpvQ3H5iGSQ==} + '@rollup/rollup-win32-ia32-msvc@4.49.0': + resolution: {integrity: sha512-gq5aW/SyNpjp71AAzroH37DtINDcX1Qw2iv9Chyz49ZgdOP3NV8QCyKZUrGsYX9Yyggj5soFiRCgsL3HwD8TdA==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.48.1': - resolution: {integrity: sha512-8a/caCUN4vkTChxkaIJcMtwIVcBhi4X2PQRoT+yCK3qRYaZ7cURrmJFL5Ux9H9RaMIXj9RuihckdmkBX3zZsgg==} + '@rollup/rollup-win32-x64-msvc@4.49.0': + resolution: {integrity: sha512-gEtqFbzmZLFk2xKh7g0Rlo8xzho8KrEFEkzvHbfUGkrgXOpZ4XagQ6n+wIZFNh1nTb8UD16J4nFSFKXYgnbdBg==} cpu: [x64] os: [win32] @@ -2157,8 +2157,8 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rollup@4.48.1: - resolution: {integrity: sha512-jVG20NvbhTYDkGAty2/Yh7HK6/q3DGSRH4o8ALKGArmMuaauM9kLfoMZ+WliPwA5+JHr2lTn3g557FxBV87ifg==} + rollup@4.49.0: + resolution: {integrity: sha512-3IVq0cGJ6H7fKXXEdVt+RcYvRCt8beYY9K1760wGQwSAHZcS9eot1zDG5axUbcp/kWRi5zKIIDX8MoKv/TzvZA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -3312,89 +3312,89 @@ snapshots: dependencies: quansync: 0.2.10 - '@rollup/plugin-terser@0.4.4(rollup@4.48.1)': + '@rollup/plugin-terser@0.4.4(rollup@4.49.0)': dependencies: serialize-javascript: 6.0.2 smob: 1.5.0 terser: 5.43.1 optionalDependencies: - rollup: 4.48.1 + rollup: 4.49.0 - '@rollup/plugin-typescript@12.1.4(rollup@4.48.1)(tslib@2.8.1)(typescript@5.8.3)': + '@rollup/plugin-typescript@12.1.4(rollup@4.49.0)(tslib@2.8.1)(typescript@5.8.3)': dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.48.1) + '@rollup/pluginutils': 5.2.0(rollup@4.49.0) resolve: 1.22.10 typescript: 5.8.3 optionalDependencies: - rollup: 4.48.1 + rollup: 4.49.0 tslib: 2.8.1 - '@rollup/pluginutils@5.2.0(rollup@4.48.1)': + '@rollup/pluginutils@5.2.0(rollup@4.49.0)': dependencies: '@types/estree': 1.0.8 estree-walker: 2.0.2 picomatch: 4.0.2 optionalDependencies: - rollup: 4.48.1 + rollup: 4.49.0 - '@rollup/rollup-android-arm-eabi@4.48.1': + '@rollup/rollup-android-arm-eabi@4.49.0': optional: true - '@rollup/rollup-android-arm64@4.48.1': + '@rollup/rollup-android-arm64@4.49.0': optional: true - '@rollup/rollup-darwin-arm64@4.48.1': + '@rollup/rollup-darwin-arm64@4.49.0': optional: true - '@rollup/rollup-darwin-x64@4.48.1': + '@rollup/rollup-darwin-x64@4.49.0': optional: true - '@rollup/rollup-freebsd-arm64@4.48.1': + '@rollup/rollup-freebsd-arm64@4.49.0': optional: true - '@rollup/rollup-freebsd-x64@4.48.1': + '@rollup/rollup-freebsd-x64@4.49.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.48.1': + '@rollup/rollup-linux-arm-gnueabihf@4.49.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.48.1': + '@rollup/rollup-linux-arm-musleabihf@4.49.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.48.1': + '@rollup/rollup-linux-arm64-gnu@4.49.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.48.1': + '@rollup/rollup-linux-arm64-musl@4.49.0': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.48.1': + '@rollup/rollup-linux-loongarch64-gnu@4.49.0': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.48.1': + '@rollup/rollup-linux-ppc64-gnu@4.49.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.48.1': + '@rollup/rollup-linux-riscv64-gnu@4.49.0': optional: true - '@rollup/rollup-linux-riscv64-musl@4.48.1': + '@rollup/rollup-linux-riscv64-musl@4.49.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.48.1': + '@rollup/rollup-linux-s390x-gnu@4.49.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.48.1': + '@rollup/rollup-linux-x64-gnu@4.49.0': optional: true - '@rollup/rollup-linux-x64-musl@4.48.1': + '@rollup/rollup-linux-x64-musl@4.49.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.48.1': + '@rollup/rollup-win32-arm64-msvc@4.49.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.48.1': + '@rollup/rollup-win32-ia32-msvc@4.49.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.48.1': + '@rollup/rollup-win32-x64-msvc@4.49.0': optional: true '@sveltejs/acorn-typescript@1.0.5(acorn@8.15.0)': @@ -4448,30 +4448,30 @@ snapshots: reusify@1.1.0: {} - rollup@4.48.1: + rollup@4.49.0: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.48.1 - '@rollup/rollup-android-arm64': 4.48.1 - '@rollup/rollup-darwin-arm64': 4.48.1 - '@rollup/rollup-darwin-x64': 4.48.1 - '@rollup/rollup-freebsd-arm64': 4.48.1 - '@rollup/rollup-freebsd-x64': 4.48.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.48.1 - '@rollup/rollup-linux-arm-musleabihf': 4.48.1 - '@rollup/rollup-linux-arm64-gnu': 4.48.1 - '@rollup/rollup-linux-arm64-musl': 4.48.1 - '@rollup/rollup-linux-loongarch64-gnu': 4.48.1 - '@rollup/rollup-linux-ppc64-gnu': 4.48.1 - '@rollup/rollup-linux-riscv64-gnu': 4.48.1 - '@rollup/rollup-linux-riscv64-musl': 4.48.1 - '@rollup/rollup-linux-s390x-gnu': 4.48.1 - '@rollup/rollup-linux-x64-gnu': 4.48.1 - '@rollup/rollup-linux-x64-musl': 4.48.1 - '@rollup/rollup-win32-arm64-msvc': 4.48.1 - '@rollup/rollup-win32-ia32-msvc': 4.48.1 - '@rollup/rollup-win32-x64-msvc': 4.48.1 + '@rollup/rollup-android-arm-eabi': 4.49.0 + '@rollup/rollup-android-arm64': 4.49.0 + '@rollup/rollup-darwin-arm64': 4.49.0 + '@rollup/rollup-darwin-x64': 4.49.0 + '@rollup/rollup-freebsd-arm64': 4.49.0 + '@rollup/rollup-freebsd-x64': 4.49.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.49.0 + '@rollup/rollup-linux-arm-musleabihf': 4.49.0 + '@rollup/rollup-linux-arm64-gnu': 4.49.0 + '@rollup/rollup-linux-arm64-musl': 4.49.0 + '@rollup/rollup-linux-loongarch64-gnu': 4.49.0 + '@rollup/rollup-linux-ppc64-gnu': 4.49.0 + '@rollup/rollup-linux-riscv64-gnu': 4.49.0 + '@rollup/rollup-linux-riscv64-musl': 4.49.0 + '@rollup/rollup-linux-s390x-gnu': 4.49.0 + '@rollup/rollup-linux-x64-gnu': 4.49.0 + '@rollup/rollup-linux-x64-musl': 4.49.0 + '@rollup/rollup-win32-arm64-msvc': 4.49.0 + '@rollup/rollup-win32-ia32-msvc': 4.49.0 + '@rollup/rollup-win32-x64-msvc': 4.49.0 fsevents: 2.3.3 run-parallel@1.2.0: @@ -4748,7 +4748,7 @@ snapshots: fdir: 6.4.6(picomatch@4.0.2) picomatch: 4.0.2 postcss: 8.5.6 - rollup: 4.48.1 + rollup: 4.49.0 tinyglobby: 0.2.14 optionalDependencies: '@types/node': 22.15.32 From c23bec62d6d5724798869681aa1534423aae28e2 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Wed, 27 Aug 2025 22:07:07 +0200 Subject: [PATCH 18/35] fix: don't set macos deployment target in dev (#14083) * fix: don't set macos deployment target in dev. * doc comment * Update .changes/skip-deployment-target-in-dev.md * Apply suggestions from code review --------- Co-authored-by: Lucas Fernandes Nogueira --- .changes/skip-deployment-target-in-dev.md | 7 +++++++ crates/tauri-build/src/lib.rs | 6 ++++-- crates/tauri-cli/config.schema.json | 2 +- crates/tauri-cli/src/build.rs | 4 ++++ crates/tauri-cli/src/bundle.rs | 4 ++++ crates/tauri-cli/src/interface/rust.rs | 2 -- crates/tauri-schema-generator/schemas/config.schema.json | 2 +- crates/tauri-utils/src/config.rs | 2 ++ 8 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 .changes/skip-deployment-target-in-dev.md diff --git a/.changes/skip-deployment-target-in-dev.md b/.changes/skip-deployment-target-in-dev.md new file mode 100644 index 000000000..fcd06572a --- /dev/null +++ b/.changes/skip-deployment-target-in-dev.md @@ -0,0 +1,7 @@ +--- +tauri-build: patch:enhance +tauri-cli: patch:enhance +'@tauri-apps/cli': patch:enhance +--- + +Tauri now ignores `macOS.minimumSystemVersion` in `tauri dev` to prevent forced rebuilds of macOS specific dependencies when using something like `rust-analyzer` at the same time as `tauri dev`. diff --git a/crates/tauri-build/src/lib.rs b/crates/tauri-build/src/lib.rs index 446aeaa5d..5e392d210 100644 --- a/crates/tauri-build/src/lib.rs +++ b/crates/tauri-build/src/lib.rs @@ -573,8 +573,10 @@ pub fn try_build(attributes: Attributes) -> Result<()> { } } - if let Some(version) = &config.bundle.macos.minimum_system_version { - println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET={version}"); + if !is_dev() { + if let Some(version) = &config.bundle.macos.minimum_system_version { + println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET={version}"); + } } } diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index c036e24fd..b14372bbc 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -3483,7 +3483,7 @@ ] }, "minimumSystemVersion": { - "description": "A version string indicating the minimum macOS X version that the bundled application supports. Defaults to `10.13`.\n\n Setting it to `null` completely removes the `LSMinimumSystemVersion` field on the bundle's `Info.plist`\n and the `MACOSX_DEPLOYMENT_TARGET` environment variable.\n\n An empty string is considered an invalid value so the default value is used.", + "description": "A version string indicating the minimum macOS X version that the bundled application supports. Defaults to `10.13`.\n\n Setting it to `null` completely removes the `LSMinimumSystemVersion` field on the bundle's `Info.plist`\n and the `MACOSX_DEPLOYMENT_TARGET` environment variable.\n\n Ignored in `tauri dev`.\n\n An empty string is considered an invalid value so the default value is used.", "default": "10.13", "type": [ "string", diff --git a/crates/tauri-cli/src/build.rs b/crates/tauri-cli/src/build.rs index bf8f68d7a..12138efcc 100644 --- a/crates/tauri-cli/src/build.rs +++ b/crates/tauri-cli/src/build.rs @@ -104,6 +104,10 @@ pub fn command(mut options: Options, verbosity: u8) -> Result<()> { let config_guard = config.lock().unwrap(); let config_ = config_guard.as_ref().unwrap(); + if let Some(minimum_system_version) = &config_.bundle.macos.minimum_system_version { + std::env::set_var("MACOSX_DEPLOYMENT_TARGET", minimum_system_version); + } + let app_settings = interface.app_settings(); let interface_options = options.clone().into(); diff --git a/crates/tauri-cli/src/bundle.rs b/crates/tauri-cli/src/bundle.rs index 3df28685c..09bb38777 100644 --- a/crates/tauri-cli/src/bundle.rs +++ b/crates/tauri-cli/src/bundle.rs @@ -136,6 +136,10 @@ pub fn command(options: Options, verbosity: u8) -> crate::Result<()> { let config_guard = config.lock().unwrap(); let config_ = config_guard.as_ref().unwrap(); + if let Some(minimum_system_version) = &config_.bundle.macos.minimum_system_version { + std::env::set_var("MACOSX_DEPLOYMENT_TARGET", minimum_system_version); + } + let app_settings = interface.app_settings(); let interface_options = options.clone().into(); diff --git a/crates/tauri-cli/src/interface/rust.rs b/crates/tauri-cli/src/interface/rust.rs index 7ef796eb5..3c39a2209 100644 --- a/crates/tauri-cli/src/interface/rust.rs +++ b/crates/tauri-cli/src/interface/rust.rs @@ -157,8 +157,6 @@ impl Interface for Rust { "IPHONEOS_DEPLOYMENT_TARGET", &config.bundle.ios.minimum_system_version, ); - } else if let Some(minimum_system_version) = &config.bundle.macos.minimum_system_version { - std::env::set_var("MACOSX_DEPLOYMENT_TARGET", minimum_system_version); } let app_settings = RustAppSettings::new(config, manifest, target)?; diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index c036e24fd..b14372bbc 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -3483,7 +3483,7 @@ ] }, "minimumSystemVersion": { - "description": "A version string indicating the minimum macOS X version that the bundled application supports. Defaults to `10.13`.\n\n Setting it to `null` completely removes the `LSMinimumSystemVersion` field on the bundle's `Info.plist`\n and the `MACOSX_DEPLOYMENT_TARGET` environment variable.\n\n An empty string is considered an invalid value so the default value is used.", + "description": "A version string indicating the minimum macOS X version that the bundled application supports. Defaults to `10.13`.\n\n Setting it to `null` completely removes the `LSMinimumSystemVersion` field on the bundle's `Info.plist`\n and the `MACOSX_DEPLOYMENT_TARGET` environment variable.\n\n Ignored in `tauri dev`.\n\n An empty string is considered an invalid value so the default value is used.", "default": "10.13", "type": [ "string", diff --git a/crates/tauri-utils/src/config.rs b/crates/tauri-utils/src/config.rs index 66e1a4670..bd7c9db0d 100644 --- a/crates/tauri-utils/src/config.rs +++ b/crates/tauri-utils/src/config.rs @@ -640,6 +640,8 @@ pub struct MacConfig { /// Setting it to `null` completely removes the `LSMinimumSystemVersion` field on the bundle's `Info.plist` /// and the `MACOSX_DEPLOYMENT_TARGET` environment variable. /// + /// Ignored in `tauri dev`. + /// /// An empty string is considered an invalid value so the default value is used. #[serde( deserialize_with = "de_macos_minimum_system_version", From f70b28529d226a2dec2f41709d8934f8f5adab25 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Wed, 27 Aug 2025 18:05:24 -0300 Subject: [PATCH 19/35] feat(cli): ensure mobile Rust targets are installed (#14093) currently we only install Rust targets for mobile when initializing the projects. Users can commit the Android/iOS projects, so running the init command is not a requirement to develop mobile apps. This change ensures the Rust targets are installed before trying to compile them. --- .changes/ensure-targets-mobile.md | 6 ++++++ .../src/mobile/android/android_studio_script.rs | 10 ++++++++++ crates/tauri-cli/src/mobile/android/build.rs | 9 +++++++++ crates/tauri-cli/src/mobile/android/dev.rs | 10 ++++++++++ crates/tauri-cli/src/mobile/android/project.rs | 3 ++- crates/tauri-cli/src/mobile/ios/project.rs | 3 ++- crates/tauri-cli/src/mobile/ios/xcode_script.rs | 14 +++++++++++++- 7 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 .changes/ensure-targets-mobile.md diff --git a/.changes/ensure-targets-mobile.md b/.changes/ensure-targets-mobile.md new file mode 100644 index 000000000..b4a091c6e --- /dev/null +++ b/.changes/ensure-targets-mobile.md @@ -0,0 +1,6 @@ +--- +"@tauri-apps/cli": patch:enhance +"tauri-cli": patch:enhance +--- + +Ensure Rust targets for mobile are installed when running the dev and build commands (previously only checked on init). diff --git a/crates/tauri-cli/src/mobile/android/android_studio_script.rs b/crates/tauri-cli/src/mobile/android/android_studio_script.rs index 7c9938852..65ffd61ec 100644 --- a/crates/tauri-cli/src/mobile/android/android_studio_script.rs +++ b/crates/tauri-cli/src/mobile/android/android_studio_script.rs @@ -132,11 +132,21 @@ pub fn command(options: Options) -> Result<()> { let mut validated_lib = false; + let installed_targets = + crate::interface::rust::installation::installed_targets().unwrap_or_default(); + call_for_targets_with_fallback( options.targets.unwrap_or_default().iter(), &detect_target_ok, &env, |target: &Target| { + if !installed_targets.contains(&target.triple().into()) { + log::info!("Installing target {}", target.triple()); + target + .install() + .context("failed to install target with rustup")?; + } + target.build( &config, &metadata, diff --git a/crates/tauri-cli/src/mobile/android/build.rs b/crates/tauri-cli/src/mobile/android/build.rs index 16a614cf2..e042979b9 100644 --- a/crates/tauri-cli/src/mobile/android/build.rs +++ b/crates/tauri-cli/src/mobile/android/build.rs @@ -167,6 +167,15 @@ pub fn command(options: Options, noise_level: NoiseLevel) -> Result<()> { crate::build::setup(&interface, &mut build_options, tauri_config.clone(), true)?; + let installed_targets = + crate::interface::rust::installation::installed_targets().unwrap_or_default(); + + if !installed_targets.contains(&first_target.triple().into()) { + log::info!("Installing target {}", first_target.triple()); + first_target + .install() + .context("failed to install target with rustup")?; + } // run an initial build to initialize plugins first_target.build(&config, &metadata, &env, noise_level, true, profile)?; diff --git a/crates/tauri-cli/src/mobile/android/dev.rs b/crates/tauri-cli/src/mobile/android/dev.rs index a6d339884..c667e7a1c 100644 --- a/crates/tauri-cli/src/mobile/android/dev.rs +++ b/crates/tauri-cli/src/mobile/android/dev.rs @@ -252,12 +252,22 @@ fn run_dev( configure_cargo(&mut env, config)?; + let installed_targets = + crate::interface::rust::installation::installed_targets().unwrap_or_default(); + // run an initial build to initialize plugins let target_triple = dev_options.target.as_ref().unwrap(); let target = Target::all() .values() .find(|t| t.triple == target_triple) .unwrap_or_else(|| Target::all().values().next().unwrap()); + if !installed_targets.contains(&target.triple().into()) { + log::info!("Installing target {}", target.triple()); + target + .install() + .context("failed to install target with rustup")?; + } + target.build( config, metadata, diff --git a/crates/tauri-cli/src/mobile/android/project.rs b/crates/tauri-cli/src/mobile/android/project.rs index 144c20346..ee6f4df0d 100644 --- a/crates/tauri-cli/src/mobile/android/project.rs +++ b/crates/tauri-cli/src/mobile/android/project.rs @@ -45,8 +45,9 @@ pub fn gen( .collect::>(); if !missing_targets.is_empty() { - println!("Installing Android Rust toolchains..."); + log::info!("Installing Android Rust targets..."); for target in missing_targets { + log::info!("Installing target {}", target.triple()); target .install() .context("failed to install target with rustup")?; diff --git a/crates/tauri-cli/src/mobile/ios/project.rs b/crates/tauri-cli/src/mobile/ios/project.rs index 62eef4b78..9b4efec3e 100644 --- a/crates/tauri-cli/src/mobile/ios/project.rs +++ b/crates/tauri-cli/src/mobile/ios/project.rs @@ -50,8 +50,9 @@ pub fn gen( .collect::>(); if !missing_targets.is_empty() { - println!("Installing iOS Rust toolchains..."); + log::info!("Installing iOS Rust targets..."); for target in missing_targets { + log::info!("Installing target {}", target.triple()); target .install() .context("failed to install target with rustup")?; diff --git a/crates/tauri-cli/src/mobile/ios/xcode_script.rs b/crates/tauri-cli/src/mobile/ios/xcode_script.rs index 7b226d3c0..dc911f04b 100644 --- a/crates/tauri-cli/src/mobile/ios/xcode_script.rs +++ b/crates/tauri-cli/src/mobile/ios/xcode_script.rs @@ -11,7 +11,7 @@ use crate::{ }; use anyhow::Context; -use cargo_mobile2::{apple::target::Target, opts::Profile}; +use cargo_mobile2::{apple::target::Target, opts::Profile, target::TargetTrait}; use clap::{ArgAction, Parser}; use object::{Object, ObjectSymbol}; @@ -209,6 +209,10 @@ pub fn command(options: Options) -> Result<()> { } else { options.arches }; + + let installed_targets = + crate::interface::rust::installation::installed_targets().unwrap_or_default(); + for arch in arches { // Set target-specific flags let (env_triple, rust_triple) = match arch.as_str() { @@ -251,6 +255,14 @@ pub fn command(options: Options) -> Result<()> { ) })? }; + + if !installed_targets.contains(&rust_triple.into()) { + log::info!("Installing target {}", target.triple()); + target + .install() + .context("failed to install target with rustup")?; + } + target.compile_lib( &config, &metadata, From 07e134f70e3a65424641f1b384a26bf059fd9c56 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 28 Aug 2025 12:36:49 -0300 Subject: [PATCH 20/35] feat(core): enhance error message for dev server request, closes #13816 (#14107) --- .changes/improve-local-network-error-message.md | 5 +++++ crates/tauri/src/protocol/tauri.rs | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .changes/improve-local-network-error-message.md diff --git a/.changes/improve-local-network-error-message.md b/.changes/improve-local-network-error-message.md new file mode 100644 index 000000000..34d0f837f --- /dev/null +++ b/.changes/improve-local-network-error-message.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:enhance +--- + +Improve error message for request errors on iOS when local network permission has been denied and the app tries to reach the development server. diff --git a/crates/tauri/src/protocol/tauri.rs b/crates/tauri/src/protocol/tauri.rs index 44f8f5056..52ba6119d 100644 --- a/crates/tauri/src/protocol/tauri.rs +++ b/crates/tauri/src/protocol/tauri.rs @@ -187,8 +187,20 @@ fn get_response( .body(response.body.to_vec().into())? } Err(e) => { - log::error!("Failed to request {}: {}", url.as_str(), e); - return Err(Box::new(e)); + let error_message = format!( + "Failed to request {}: {}{}", + url.as_str(), + e, + if let Some(s) = e.status() { + format!("status code: {}", s.as_u16()) + } else if cfg!(target_os = "ios") { + ", did you grant local network permissions? That is required to reach the development server. Please grant the permission via the prompt or in `Settings > Privacy & Security > Local Network` and restart the app. See https://support.apple.com/en-us/102229 for more information.".to_string() + } else { + "".to_string() + } + ); + log::error!("{error_message}"); + return Err(error_message.into()); } } }; From 956b4fd6ffbb4312123b107ca96c87a001359b9d Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 28 Aug 2025 12:37:26 -0300 Subject: [PATCH 21/35] fix(cli): export method on Xcode < 15.4, closes #13818 (#14106) see https://github.com/fastlane/fastlane/issues/22028 for additional context --- .changes/map-export-method-deprecated.md | 6 +++++ crates/tauri-cli/src/info/env_system.rs | 22 ++++++++++++++++ crates/tauri-cli/src/info/mod.rs | 2 +- crates/tauri-cli/src/mobile/ios/build.rs | 33 +++++++++++++++++++++++- 4 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 .changes/map-export-method-deprecated.md diff --git a/.changes/map-export-method-deprecated.md b/.changes/map-export-method-deprecated.md new file mode 100644 index 000000000..6369d1209 --- /dev/null +++ b/.changes/map-export-method-deprecated.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": patch:bug +"@tauri-apps/cli": patch:bug +--- + +Use the correct export method on Xcode < 15.4. diff --git a/crates/tauri-cli/src/info/env_system.rs b/crates/tauri-cli/src/info/env_system.rs index 88083b5b2..797594820 100644 --- a/crates/tauri-cli/src/info/env_system.rs +++ b/crates/tauri-cli/src/info/env_system.rs @@ -175,6 +175,22 @@ fn is_xcode_command_line_tools_installed() -> bool { .map(|o| o.status.success()) .unwrap_or(false) } + +#[cfg(target_os = "macos")] +pub fn xcode_version() -> Option { + Command::new("xcodebuild") + .arg("-version") + .output() + .ok() + .map(|o| String::from_utf8_lossy(&o.stdout).into_owned()) + .and_then(|s| { + s.split('\n') + .filter_map(|line| line.strip_prefix("Xcode ")) + .next() + .map(ToString::to_string) + }) +} + fn de_and_session() -> String { #[cfg(any( target_os = "linux", @@ -319,5 +335,11 @@ pub fn items() -> Vec { }.into() }, ), + #[cfg(target_os = "macos")] + SectionItem::new().action(|| { + xcode_version().map(|v| (format!("Xcode: {v}"), Status::Success)).unwrap_or_else(|| { + (format!("Xcode: {}", "not installed!".red()), Status::Error) + }).into() + }), ] } diff --git a/crates/tauri-cli/src/info/mod.rs b/crates/tauri-cli/src/info/mod.rs index 1084ba4e3..2a774da2d 100644 --- a/crates/tauri-cli/src/info/mod.rs +++ b/crates/tauri-cli/src/info/mod.rs @@ -15,7 +15,7 @@ use std::fmt::{self, Display, Formatter}; mod app; mod env_nodejs; mod env_rust; -mod env_system; +pub mod env_system; #[cfg(target_os = "macos")] mod ios; mod packages_nodejs; diff --git a/crates/tauri-cli/src/mobile/ios/build.rs b/crates/tauri-cli/src/mobile/ios/build.rs index 177155dc2..7145a8ebe 100644 --- a/crates/tauri-cli/src/mobile/ios/build.rs +++ b/crates/tauri-cli/src/mobile/ios/build.rs @@ -102,6 +102,17 @@ pub enum ExportMethod { Debugging, } +impl ExportMethod { + /// Xcode 15.4 deprecated these names (in this case we should use the Display impl). + pub fn pre_xcode_15_4_name(&self) -> String { + match self { + Self::AppStoreConnect => "app-store".to_string(), + Self::ReleaseTesting => "ad-hoc".to_string(), + Self::Debugging => "development".to_string(), + } + } +} + impl std::fmt::Display for ExportMethod { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { @@ -215,7 +226,27 @@ pub fn command(options: Options, noise_level: NoiseLevel) -> Result<()> { let mut export_options_plist = plist::Dictionary::new(); if let Some(method) = options.export_method { - export_options_plist.insert("method".to_string(), method.to_string().into()); + let xcode_version = + crate::info::env_system::xcode_version().context("failed to determine Xcode version")?; + let mut iter = xcode_version.split('.'); + let major = iter.next().context(format!( + "failed to parse Xcode version `{xcode_version}` as semver" + ))?; + let minor = iter.next().context(format!( + "failed to parse Xcode version `{xcode_version}` as semver" + ))?; + let major = major.parse::().context(format!( + "failed to parse Xcode version `{xcode_version}` as semver: major is not a number" + ))?; + let minor = minor.parse::().context(format!( + "failed to parse Xcode version `{xcode_version}` as semver: minor is not a number" + ))?; + + if major < 15 || (major == 15 && minor < 4) { + export_options_plist.insert("method".to_string(), method.pre_xcode_15_4_name().into()); + } else { + export_options_plist.insert("method".to_string(), method.to_string().into()); + } } let (keychain, provisioning_profile) = super::signing_from_env()?; From b8b866fcc72b2688e501e49c55fdadcca0960883 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Thu, 28 Aug 2025 15:09:36 -0300 Subject: [PATCH 22/35] fix(examples): update tauri-plugin-log fixes iOS deadlock --- Cargo.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 874481561..e1dcdc091 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1319,7 +1319,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -4311,7 +4311,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -8816,9 +8816,9 @@ dependencies = [ [[package]] name = "tauri-plugin-log" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2b582d860eb214f28323f4ce4f2797ae3b78f197e27b11677f976f9f52aedb" +checksum = "a59139183e0907cec1499dddee4e085f5a801dc659efa0848ee224f461371426" dependencies = [ "android_logger", "byte-unit", @@ -10311,7 +10311,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] From c37a298331d6d744b15d32d55a2db83c884a3d6a Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 28 Aug 2025 18:02:09 -0300 Subject: [PATCH 23/35] fix(cli): set package type for Deno (#14112) without the type Deno assumes that the package is a ESM so it cannot use `require` we should probably update our minimum Node.js version and use ESM instead, but I want to ship this fix first --- .changes/fix-cli-deno.md | 6 ++++++ packages/cli/package.json | 1 + 2 files changed, 7 insertions(+) create mode 100644 .changes/fix-cli-deno.md diff --git a/.changes/fix-cli-deno.md b/.changes/fix-cli-deno.md new file mode 100644 index 000000000..c9a49a50b --- /dev/null +++ b/.changes/fix-cli-deno.md @@ -0,0 +1,6 @@ +--- +"@tauri-apps/cli": patch:bug +"tauri-cli": patch:bug +--- + +Fix usage with Deno failing with `ReferenceError: require is not defined`. diff --git a/packages/cli/package.json b/packages/cli/package.json index 7e83e8faa..aa2e9f264 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -2,6 +2,7 @@ "name": "@tauri-apps/cli", "version": "2.8.3", "description": "Command line interface for building Tauri apps", + "type": "commonjs", "funding": { "type": "opencollective", "url": "https://opencollective.com/tauri" From 61b9b681e88067a53b79d2318ae005dc25addcd6 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 28 Aug 2025 18:02:22 -0300 Subject: [PATCH 24/35] feat(cli): retain all RUST_* env vars on mobile commands (#14111) useful to propagate RUST_BACKTRACE to the IDE commands --- .changes/retain-rust-vars.md | 6 ++++++ crates/tauri-cli/src/mobile/mod.rs | 1 + 2 files changed, 7 insertions(+) create mode 100644 .changes/retain-rust-vars.md diff --git a/.changes/retain-rust-vars.md b/.changes/retain-rust-vars.md new file mode 100644 index 000000000..4e12f0430 --- /dev/null +++ b/.changes/retain-rust-vars.md @@ -0,0 +1,6 @@ +--- +"@tauri-apps/cli": patch:enhance +"tauri-cli": patch:enhance +--- + +Retain `RUST_*` environment variables when running the mobile commands. diff --git a/crates/tauri-cli/src/mobile/mod.rs b/crates/tauri-cli/src/mobile/mod.rs index abdd96107..64504f547 100644 --- a/crates/tauri-cli/src/mobile/mod.rs +++ b/crates/tauri-cli/src/mobile/mod.rs @@ -347,6 +347,7 @@ fn env_vars() -> HashMap { && k != "TAURI_SIGNING_PRIVATE_KEY_PASSWORD") || k.starts_with("WRY") || k.starts_with("CARGO_") + || k.starts_with("RUST_") || k == "TMPDIR" || k == "PATH" { From bcf000c0a8607eedf488fb949b982f519abda43d Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 28 Aug 2025 18:02:46 -0300 Subject: [PATCH 25/35] fix(cli): ios command failing when running with deno, closes #13547 (#14110) Deno doesn't set an environment variable to help us, so I had to use the exe path to determine whether we're running under deno or not --- .changes/fix-deno-cli-ios.md | 6 ++++++ crates/tauri-cli/src/mobile/ios/xcode_script.rs | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .changes/fix-deno-cli-ios.md diff --git a/.changes/fix-deno-cli-ios.md b/.changes/fix-deno-cli-ios.md new file mode 100644 index 000000000..8e2b6698c --- /dev/null +++ b/.changes/fix-deno-cli-ios.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": patch:bug +"@tauri-apps/cli": patch:bug +--- + +Fixes running `ios` commands with `deno` crashing due to incorrect current working directory resolution. diff --git a/crates/tauri-cli/src/mobile/ios/xcode_script.rs b/crates/tauri-cli/src/mobile/ios/xcode_script.rs index dc911f04b..0217aaa80 100644 --- a/crates/tauri-cli/src/mobile/ios/xcode_script.rs +++ b/crates/tauri-cli/src/mobile/ios/xcode_script.rs @@ -65,12 +65,16 @@ pub fn command(options: Options) -> Result<()> { } } - // `xcode-script` is ran from the `gen/apple` folder when not using NPM/yarn/pnpm. + let process_path = std::env::current_exe().unwrap_or_default(); + + // `xcode-script` is ran from the `gen/apple` folder when not using NPM/yarn/pnpm/deno. // so we must change working directory to the src-tauri folder to resolve the tauri dir // additionally, bun@<1.2 does not modify the current working directory, so it is also runs this script from `gen/apple` // bun@>1.2 now actually moves the CWD to the package root so we shouldn't modify CWD in that case // see https://bun.sh/blog/bun-v1.2#bun-run-uses-the-correct-directory - if (var_os("npm_lifecycle_event").is_none() && var_os("PNPM_PACKAGE_NAME").is_none()) + if (var_os("npm_lifecycle_event").is_none() + && var_os("PNPM_PACKAGE_NAME").is_none() + && process_path.file_stem().unwrap_or_default() != "deno") || var("npm_config_user_agent") .is_ok_and(|agent| agent.starts_with("bun/1.0") || agent.starts_with("bun/1.1")) { From a9b342125d5ac1bc9a4b2e8b5f73e8ca3cbcb8b2 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 28 Aug 2025 18:16:42 -0300 Subject: [PATCH 26/35] fix(cli): iOS simulator dev/build on Apple Intel, closes #13456 (#14114) applies https://github.com/tauri-apps/cargo-mobile2/pull/479 --- .changes/fix-ios-sim-intel.md | 6 ++++++ Cargo.lock | 4 ++-- crates/tauri-cli/Cargo.toml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .changes/fix-ios-sim-intel.md diff --git a/.changes/fix-ios-sim-intel.md b/.changes/fix-ios-sim-intel.md new file mode 100644 index 000000000..93de24aa8 --- /dev/null +++ b/.changes/fix-ios-sim-intel.md @@ -0,0 +1,6 @@ +--- +"@tauri-apps/cli": patch:enhance +"tauri-cli": patch:enhance +--- + +Fix iOS dev and build targeting the simulator on Intel machines. diff --git a/Cargo.lock b/Cargo.lock index e1dcdc091..9be77bdb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1055,9 +1055,9 @@ dependencies = [ [[package]] name = "cargo-mobile2" -version = "0.20.4" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93c1021dbbc971a4801008e7faf1c255b56c8317a2a10970703ee46caa3343e" +checksum = "567e0eecdee84aa11424c2ad1c5dd30cdd820934e1ef1cc9fc51cfbde5782589" dependencies = [ "colored", "core-foundation 0.10.0", diff --git a/crates/tauri-cli/Cargo.toml b/crates/tauri-cli/Cargo.toml index 8fd5f60f7..7ae311546 100644 --- a/crates/tauri-cli/Cargo.toml +++ b/crates/tauri-cli/Cargo.toml @@ -36,7 +36,7 @@ name = "cargo-tauri" path = "src/main.rs" [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"windows\", target_os = \"macos\"))".dependencies] -cargo-mobile2 = { version = "0.20.2", default-features = false } +cargo-mobile2 = { version = "0.20.5", default-features = false } [dependencies] jsonrpsee = { version = "0.24", features = ["server"] } From 7db7142f9ff7dc2f5719602e199b77129ceb19d3 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Fri, 29 Aug 2025 11:45:04 -0300 Subject: [PATCH 27/35] fix(cli): empty Android emulator name (#14119) applies https://github.com/tauri-apps/cargo-mobile2/pull/481 --- .changes/fix-emulator-name.md | 6 ++++++ Cargo.lock | 4 ++-- crates/tauri-cli/Cargo.toml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .changes/fix-emulator-name.md diff --git a/.changes/fix-emulator-name.md b/.changes/fix-emulator-name.md new file mode 100644 index 000000000..20bf512ec --- /dev/null +++ b/.changes/fix-emulator-name.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": patch:bug +"@tauri-apps/cli": patch:bug +--- + +Fixes empty device name when using an Android emulator causing the emulator to never be detected as running. diff --git a/Cargo.lock b/Cargo.lock index 9be77bdb1..8e8d93be1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1055,9 +1055,9 @@ dependencies = [ [[package]] name = "cargo-mobile2" -version = "0.20.5" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567e0eecdee84aa11424c2ad1c5dd30cdd820934e1ef1cc9fc51cfbde5782589" +checksum = "35613119e2e16b293e56557a27da0d5bc42031f5edc0bf4f73a2b4d310d39c65" dependencies = [ "colored", "core-foundation 0.10.0", diff --git a/crates/tauri-cli/Cargo.toml b/crates/tauri-cli/Cargo.toml index 7ae311546..46d095f5c 100644 --- a/crates/tauri-cli/Cargo.toml +++ b/crates/tauri-cli/Cargo.toml @@ -36,7 +36,7 @@ name = "cargo-tauri" path = "src/main.rs" [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"windows\", target_os = \"macos\"))".dependencies] -cargo-mobile2 = { version = "0.20.5", default-features = false } +cargo-mobile2 = { version = "0.20.6", default-features = false } [dependencies] jsonrpsee = { version = "0.24", features = ["server"] } From 0b1da30d2814dda1646492b1ea9d762fbcbfe38a Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Sat, 30 Aug 2025 08:09:38 -0300 Subject: [PATCH 28/35] chore(tauri): update documentation for home_dir on iOS (#14121) * chore(tauri): update documentation for home_dir on iOS ref #12497 * update --- crates/tauri/src/path/android.rs | 1 + crates/tauri/src/path/desktop.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/tauri/src/path/android.rs b/crates/tauri/src/path/android.rs index 03b1f5f93..aa185f84f 100644 --- a/crates/tauri/src/path/android.rs +++ b/crates/tauri/src/path/android.rs @@ -174,6 +174,7 @@ impl PathResolver { /// - **Linux:** Resolves to `$HOME`. /// - **macOS:** Resolves to `$HOME`. /// - **Windows:** Resolves to `{FOLDERID_Profile}`. + /// - **iOS**: Cannot be written to directly, use one of the app paths instead. pub fn home_dir(&self) -> Result { self.call_resolve("getHomeDir") } diff --git a/crates/tauri/src/path/desktop.rs b/crates/tauri/src/path/desktop.rs index 37fbb4f41..96ea0bd7e 100644 --- a/crates/tauri/src/path/desktop.rs +++ b/crates/tauri/src/path/desktop.rs @@ -149,6 +149,7 @@ impl PathResolver { /// - **Linux:** Resolves to `$HOME`. /// - **macOS:** Resolves to `$HOME`. /// - **Windows:** Resolves to `{FOLDERID_Profile}`. + /// - **iOS**: Cannot be written to directly, use one of the app paths instead. pub fn home_dir(&self) -> Result { dirs::home_dir().ok_or(Error::UnknownPath) } From 5239d39149e80a93ebd2eda7c864b869a0d16016 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 31 Aug 2025 17:51:26 +0800 Subject: [PATCH 29/35] chore(deps): update dependency rollup to v4.50.0 (#14127) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- packages/api/package.json | 2 +- pnpm-lock.yaml | 199 ++++++++++++++++++++------------------ 2 files changed, 105 insertions(+), 96 deletions(-) diff --git a/packages/api/package.json b/packages/api/package.json index 20ed0f8c1..1cb7e94cb 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -55,7 +55,7 @@ "eslint-plugin-security": "3.0.1", "fast-glob": "3.3.3", "globals": "^16.2.0", - "rollup": "4.49.0", + "rollup": "4.50.0", "tslib": "^2.8.1", "typescript": "^5.8.3", "typescript-eslint": "^8.34.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4c93d9f94..9a28dc3b1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,10 +63,10 @@ importers: version: 9.29.0 '@rollup/plugin-terser': specifier: 0.4.4 - version: 0.4.4(rollup@4.49.0) + version: 0.4.4(rollup@4.50.0) '@rollup/plugin-typescript': specifier: 12.1.4 - version: 12.1.4(rollup@4.49.0)(tslib@2.8.1)(typescript@5.8.3) + version: 12.1.4(rollup@4.50.0)(tslib@2.8.1)(typescript@5.8.3) '@types/eslint': specifier: ^9.6.1 version: 9.6.1 @@ -89,8 +89,8 @@ importers: specifier: ^16.2.0 version: 16.2.0 rollup: - specifier: 4.49.0 - version: 4.49.0 + specifier: 4.50.0 + version: 4.50.0 tslib: specifier: ^2.8.1 version: 2.8.1 @@ -1103,103 +1103,108 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.49.0': - resolution: {integrity: sha512-rlKIeL854Ed0e09QGYFlmDNbka6I3EQFw7iZuugQjMb11KMpJCLPFL4ZPbMfaEhLADEL1yx0oujGkBQ7+qW3eA==} + '@rollup/rollup-android-arm-eabi@4.50.0': + resolution: {integrity: sha512-lVgpeQyy4fWN5QYebtW4buT/4kn4p4IJ+kDNB4uYNT5b8c8DLJDg6titg20NIg7E8RWwdWZORW6vUFfrLyG3KQ==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.49.0': - resolution: {integrity: sha512-cqPpZdKUSQYRtLLr6R4X3sD4jCBO1zUmeo3qrWBCqYIeH8Q3KRL4F3V7XJ2Rm8/RJOQBZuqzQGWPjjvFUcYa/w==} + '@rollup/rollup-android-arm64@4.50.0': + resolution: {integrity: sha512-2O73dR4Dc9bp+wSYhviP6sDziurB5/HCym7xILKifWdE9UsOe2FtNcM+I4xZjKrfLJnq5UR8k9riB87gauiQtw==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.49.0': - resolution: {integrity: sha512-99kMMSMQT7got6iYX3yyIiJfFndpojBmkHfTc1rIje8VbjhmqBXE+nb7ZZP3A5skLyujvT0eIUCUsxAe6NjWbw==} + '@rollup/rollup-darwin-arm64@4.50.0': + resolution: {integrity: sha512-vwSXQN8T4sKf1RHr1F0s98Pf8UPz7pS6P3LG9NSmuw0TVh7EmaE+5Ny7hJOZ0M2yuTctEsHHRTMi2wuHkdS6Hg==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.49.0': - resolution: {integrity: sha512-y8cXoD3wdWUDpjOLMKLx6l+NFz3NlkWKcBCBfttUn+VGSfgsQ5o/yDUGtzE9HvsodkP0+16N0P4Ty1VuhtRUGg==} + '@rollup/rollup-darwin-x64@4.50.0': + resolution: {integrity: sha512-cQp/WG8HE7BCGyFVuzUg0FNmupxC+EPZEwWu2FCGGw5WDT1o2/YlENbm5e9SMvfDFR6FRhVCBePLqj0o8MN7Vw==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.49.0': - resolution: {integrity: sha512-3mY5Pr7qv4GS4ZvWoSP8zha8YoiqrU+e0ViPvB549jvliBbdNLrg2ywPGkgLC3cmvN8ya3za+Q2xVyT6z+vZqA==} + '@rollup/rollup-freebsd-arm64@4.50.0': + resolution: {integrity: sha512-UR1uTJFU/p801DvvBbtDD7z9mQL8J80xB0bR7DqW7UGQHRm/OaKzp4is7sQSdbt2pjjSS72eAtRh43hNduTnnQ==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.49.0': - resolution: {integrity: sha512-C9KzzOAQU5gU4kG8DTk+tjdKjpWhVWd5uVkinCwwFub2m7cDYLOdtXoMrExfeBmeRy9kBQMkiyJ+HULyF1yj9w==} + '@rollup/rollup-freebsd-x64@4.50.0': + resolution: {integrity: sha512-G/DKyS6PK0dD0+VEzH/6n/hWDNPDZSMBmqsElWnCRGrYOb2jC0VSupp7UAHHQ4+QILwkxSMaYIbQ72dktp8pKA==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.49.0': - resolution: {integrity: sha512-OVSQgEZDVLnTbMq5NBs6xkmz3AADByCWI4RdKSFNlDsYXdFtlxS59J+w+LippJe8KcmeSSM3ba+GlsM9+WwC1w==} + '@rollup/rollup-linux-arm-gnueabihf@4.50.0': + resolution: {integrity: sha512-u72Mzc6jyJwKjJbZZcIYmd9bumJu7KNmHYdue43vT1rXPm2rITwmPWF0mmPzLm9/vJWxIRbao/jrQmxTO0Sm9w==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.49.0': - resolution: {integrity: sha512-ZnfSFA7fDUHNa4P3VwAcfaBLakCbYaxCk0jUnS3dTou9P95kwoOLAMlT3WmEJDBCSrOEFFV0Y1HXiwfLYJuLlA==} + '@rollup/rollup-linux-arm-musleabihf@4.50.0': + resolution: {integrity: sha512-S4UefYdV0tnynDJV1mdkNawp0E5Qm2MtSs330IyHgaccOFrwqsvgigUD29uT+B/70PDY1eQ3t40+xf6wIvXJyg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.49.0': - resolution: {integrity: sha512-Z81u+gfrobVK2iV7GqZCBfEB1y6+I61AH466lNK+xy1jfqFLiQ9Qv716WUM5fxFrYxwC7ziVdZRU9qvGHkYIJg==} + '@rollup/rollup-linux-arm64-gnu@4.50.0': + resolution: {integrity: sha512-1EhkSvUQXJsIhk4msxP5nNAUWoB4MFDHhtc4gAYvnqoHlaL9V3F37pNHabndawsfy/Tp7BPiy/aSa6XBYbaD1g==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.49.0': - resolution: {integrity: sha512-zoAwS0KCXSnTp9NH/h9aamBAIve0DXeYpll85shf9NJ0URjSTzzS+Z9evmolN+ICfD3v8skKUPyk2PO0uGdFqg==} + '@rollup/rollup-linux-arm64-musl@4.50.0': + resolution: {integrity: sha512-EtBDIZuDtVg75xIPIK1l5vCXNNCIRM0OBPUG+tbApDuJAy9mKago6QxX+tfMzbCI6tXEhMuZuN1+CU8iDW+0UQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.49.0': - resolution: {integrity: sha512-2QyUyQQ1ZtwZGiq0nvODL+vLJBtciItC3/5cYN8ncDQcv5avrt2MbKt1XU/vFAJlLta5KujqyHdYtdag4YEjYQ==} + '@rollup/rollup-linux-loongarch64-gnu@4.50.0': + resolution: {integrity: sha512-BGYSwJdMP0hT5CCmljuSNx7+k+0upweM2M4YGfFBjnFSZMHOLYR0gEEj/dxyYJ6Zc6AiSeaBY8dWOa11GF/ppQ==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.49.0': - resolution: {integrity: sha512-k9aEmOWt+mrMuD3skjVJSSxHckJp+SiFzFG+v8JLXbc/xi9hv2icSkR3U7uQzqy+/QbbYY7iNB9eDTwrELo14g==} + '@rollup/rollup-linux-ppc64-gnu@4.50.0': + resolution: {integrity: sha512-I1gSMzkVe1KzAxKAroCJL30hA4DqSi+wGc5gviD0y3IL/VkvcnAqwBf4RHXHyvH66YVHxpKO8ojrgc4SrWAnLg==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.49.0': - resolution: {integrity: sha512-rDKRFFIWJ/zJn6uk2IdYLc09Z7zkE5IFIOWqpuU0o6ZpHcdniAyWkwSUWE/Z25N/wNDmFHHMzin84qW7Wzkjsw==} + '@rollup/rollup-linux-riscv64-gnu@4.50.0': + resolution: {integrity: sha512-bSbWlY3jZo7molh4tc5dKfeSxkqnf48UsLqYbUhnkdnfgZjgufLS/NTA8PcP/dnvct5CCdNkABJ56CbclMRYCA==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.49.0': - resolution: {integrity: sha512-FkkhIY/hYFVnOzz1WeV3S9Bd1h0hda/gRqvZCMpHWDHdiIHn6pqsY3b5eSbvGccWHMQ1uUzgZTKS4oGpykf8Tw==} + '@rollup/rollup-linux-riscv64-musl@4.50.0': + resolution: {integrity: sha512-LSXSGumSURzEQLT2e4sFqFOv3LWZsEF8FK7AAv9zHZNDdMnUPYH3t8ZlaeYYZyTXnsob3htwTKeWtBIkPV27iQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.49.0': - resolution: {integrity: sha512-gRf5c+A7QiOG3UwLyOOtyJMD31JJhMjBvpfhAitPAoqZFcOeK3Kc1Veg1z/trmt+2P6F/biT02fU19GGTS529A==} + '@rollup/rollup-linux-s390x-gnu@4.50.0': + resolution: {integrity: sha512-CxRKyakfDrsLXiCyucVfVWVoaPA4oFSpPpDwlMcDFQvrv3XY6KEzMtMZrA+e/goC8xxp2WSOxHQubP8fPmmjOQ==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.49.0': - resolution: {integrity: sha512-BR7+blScdLW1h/2hB/2oXM+dhTmpW3rQt1DeSiCP9mc2NMMkqVgjIN3DDsNpKmezffGC9R8XKVOLmBkRUcK/sA==} + '@rollup/rollup-linux-x64-gnu@4.50.0': + resolution: {integrity: sha512-8PrJJA7/VU8ToHVEPu14FzuSAqVKyo5gg/J8xUerMbyNkWkO9j2ExBho/68RnJsMGNJq4zH114iAttgm7BZVkA==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.49.0': - resolution: {integrity: sha512-hDMOAe+6nX3V5ei1I7Au3wcr9h3ktKzDvF2ne5ovX8RZiAHEtX1A5SNNk4zt1Qt77CmnbqT+upb/umzoPMWiPg==} + '@rollup/rollup-linux-x64-musl@4.50.0': + resolution: {integrity: sha512-SkE6YQp+CzpyOrbw7Oc4MgXFvTw2UIBElvAvLCo230pyxOLmYwRPwZ/L5lBe/VW/qT1ZgND9wJfOsdy0XptRvw==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.49.0': - resolution: {integrity: sha512-wkNRzfiIGaElC9kXUT+HLx17z7D0jl+9tGYRKwd8r7cUqTL7GYAvgUY++U2hK6Ar7z5Z6IRRoWC8kQxpmM7TDA==} + '@rollup/rollup-openharmony-arm64@4.50.0': + resolution: {integrity: sha512-PZkNLPfvXeIOgJWA804zjSFH7fARBBCpCXxgkGDRjjAhRLOR8o0IGS01ykh5GYfod4c2yiiREuDM8iZ+pVsT+Q==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.50.0': + resolution: {integrity: sha512-q7cIIdFvWQoaCbLDUyUc8YfR3Jh2xx3unO8Dn6/TTogKjfwrax9SyfmGGK6cQhKtjePI7jRfd7iRYcxYs93esg==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.49.0': - resolution: {integrity: sha512-gq5aW/SyNpjp71AAzroH37DtINDcX1Qw2iv9Chyz49ZgdOP3NV8QCyKZUrGsYX9Yyggj5soFiRCgsL3HwD8TdA==} + '@rollup/rollup-win32-ia32-msvc@4.50.0': + resolution: {integrity: sha512-XzNOVg/YnDOmFdDKcxxK410PrcbcqZkBmz+0FicpW5jtjKQxcW1BZJEQOF0NJa6JO7CZhett8GEtRN/wYLYJuw==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.49.0': - resolution: {integrity: sha512-gEtqFbzmZLFk2xKh7g0Rlo8xzho8KrEFEkzvHbfUGkrgXOpZ4XagQ6n+wIZFNh1nTb8UD16J4nFSFKXYgnbdBg==} + '@rollup/rollup-win32-x64-msvc@4.50.0': + resolution: {integrity: sha512-xMmiWRR8sp72Zqwjgtf3QbZfF1wdh8X2ABu3EaozvZcyHJeU0r+XAnXdKgs4cCAp6ORoYoCygipYP1mjmbjrsg==} cpu: [x64] os: [win32] @@ -2157,8 +2162,8 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rollup@4.49.0: - resolution: {integrity: sha512-3IVq0cGJ6H7fKXXEdVt+RcYvRCt8beYY9K1760wGQwSAHZcS9eot1zDG5axUbcp/kWRi5zKIIDX8MoKv/TzvZA==} + rollup@4.50.0: + resolution: {integrity: sha512-/Zl4D8zPifNmyGzJS+3kVoyXeDeT/GrsJM94sACNg9RtUE0hrHa1bNPtRSrfHTMH5HjRzce6K7rlTh3Khiw+pw==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -3312,89 +3317,92 @@ snapshots: dependencies: quansync: 0.2.10 - '@rollup/plugin-terser@0.4.4(rollup@4.49.0)': + '@rollup/plugin-terser@0.4.4(rollup@4.50.0)': dependencies: serialize-javascript: 6.0.2 smob: 1.5.0 terser: 5.43.1 optionalDependencies: - rollup: 4.49.0 + rollup: 4.50.0 - '@rollup/plugin-typescript@12.1.4(rollup@4.49.0)(tslib@2.8.1)(typescript@5.8.3)': + '@rollup/plugin-typescript@12.1.4(rollup@4.50.0)(tslib@2.8.1)(typescript@5.8.3)': dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.49.0) + '@rollup/pluginutils': 5.2.0(rollup@4.50.0) resolve: 1.22.10 typescript: 5.8.3 optionalDependencies: - rollup: 4.49.0 + rollup: 4.50.0 tslib: 2.8.1 - '@rollup/pluginutils@5.2.0(rollup@4.49.0)': + '@rollup/pluginutils@5.2.0(rollup@4.50.0)': dependencies: '@types/estree': 1.0.8 estree-walker: 2.0.2 picomatch: 4.0.2 optionalDependencies: - rollup: 4.49.0 + rollup: 4.50.0 - '@rollup/rollup-android-arm-eabi@4.49.0': + '@rollup/rollup-android-arm-eabi@4.50.0': optional: true - '@rollup/rollup-android-arm64@4.49.0': + '@rollup/rollup-android-arm64@4.50.0': optional: true - '@rollup/rollup-darwin-arm64@4.49.0': + '@rollup/rollup-darwin-arm64@4.50.0': optional: true - '@rollup/rollup-darwin-x64@4.49.0': + '@rollup/rollup-darwin-x64@4.50.0': optional: true - '@rollup/rollup-freebsd-arm64@4.49.0': + '@rollup/rollup-freebsd-arm64@4.50.0': optional: true - '@rollup/rollup-freebsd-x64@4.49.0': + '@rollup/rollup-freebsd-x64@4.50.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.49.0': + '@rollup/rollup-linux-arm-gnueabihf@4.50.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.49.0': + '@rollup/rollup-linux-arm-musleabihf@4.50.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.49.0': + '@rollup/rollup-linux-arm64-gnu@4.50.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.49.0': + '@rollup/rollup-linux-arm64-musl@4.50.0': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.49.0': + '@rollup/rollup-linux-loongarch64-gnu@4.50.0': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.49.0': + '@rollup/rollup-linux-ppc64-gnu@4.50.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.49.0': + '@rollup/rollup-linux-riscv64-gnu@4.50.0': optional: true - '@rollup/rollup-linux-riscv64-musl@4.49.0': + '@rollup/rollup-linux-riscv64-musl@4.50.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.49.0': + '@rollup/rollup-linux-s390x-gnu@4.50.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.49.0': + '@rollup/rollup-linux-x64-gnu@4.50.0': optional: true - '@rollup/rollup-linux-x64-musl@4.49.0': + '@rollup/rollup-linux-x64-musl@4.50.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.49.0': + '@rollup/rollup-openharmony-arm64@4.50.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.49.0': + '@rollup/rollup-win32-arm64-msvc@4.50.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.49.0': + '@rollup/rollup-win32-ia32-msvc@4.50.0': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.50.0': optional: true '@sveltejs/acorn-typescript@1.0.5(acorn@8.15.0)': @@ -4448,30 +4456,31 @@ snapshots: reusify@1.1.0: {} - rollup@4.49.0: + rollup@4.50.0: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.49.0 - '@rollup/rollup-android-arm64': 4.49.0 - '@rollup/rollup-darwin-arm64': 4.49.0 - '@rollup/rollup-darwin-x64': 4.49.0 - '@rollup/rollup-freebsd-arm64': 4.49.0 - '@rollup/rollup-freebsd-x64': 4.49.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.49.0 - '@rollup/rollup-linux-arm-musleabihf': 4.49.0 - '@rollup/rollup-linux-arm64-gnu': 4.49.0 - '@rollup/rollup-linux-arm64-musl': 4.49.0 - '@rollup/rollup-linux-loongarch64-gnu': 4.49.0 - '@rollup/rollup-linux-ppc64-gnu': 4.49.0 - '@rollup/rollup-linux-riscv64-gnu': 4.49.0 - '@rollup/rollup-linux-riscv64-musl': 4.49.0 - '@rollup/rollup-linux-s390x-gnu': 4.49.0 - '@rollup/rollup-linux-x64-gnu': 4.49.0 - '@rollup/rollup-linux-x64-musl': 4.49.0 - '@rollup/rollup-win32-arm64-msvc': 4.49.0 - '@rollup/rollup-win32-ia32-msvc': 4.49.0 - '@rollup/rollup-win32-x64-msvc': 4.49.0 + '@rollup/rollup-android-arm-eabi': 4.50.0 + '@rollup/rollup-android-arm64': 4.50.0 + '@rollup/rollup-darwin-arm64': 4.50.0 + '@rollup/rollup-darwin-x64': 4.50.0 + '@rollup/rollup-freebsd-arm64': 4.50.0 + '@rollup/rollup-freebsd-x64': 4.50.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.50.0 + '@rollup/rollup-linux-arm-musleabihf': 4.50.0 + '@rollup/rollup-linux-arm64-gnu': 4.50.0 + '@rollup/rollup-linux-arm64-musl': 4.50.0 + '@rollup/rollup-linux-loongarch64-gnu': 4.50.0 + '@rollup/rollup-linux-ppc64-gnu': 4.50.0 + '@rollup/rollup-linux-riscv64-gnu': 4.50.0 + '@rollup/rollup-linux-riscv64-musl': 4.50.0 + '@rollup/rollup-linux-s390x-gnu': 4.50.0 + '@rollup/rollup-linux-x64-gnu': 4.50.0 + '@rollup/rollup-linux-x64-musl': 4.50.0 + '@rollup/rollup-openharmony-arm64': 4.50.0 + '@rollup/rollup-win32-arm64-msvc': 4.50.0 + '@rollup/rollup-win32-ia32-msvc': 4.50.0 + '@rollup/rollup-win32-x64-msvc': 4.50.0 fsevents: 2.3.3 run-parallel@1.2.0: @@ -4748,7 +4757,7 @@ snapshots: fdir: 6.4.6(picomatch@4.0.2) picomatch: 4.0.2 postcss: 8.5.6 - rollup: 4.49.0 + rollup: 4.50.0 tinyglobby: 0.2.14 optionalDependencies: '@types/node': 22.15.32 From 346a420812e70c01b9983b550659aeddfc15dbea Mon Sep 17 00:00:00 2001 From: Tony <68118705+Legend-Master@users.noreply.github.com> Date: Mon, 1 Sep 2025 23:15:43 +0800 Subject: [PATCH 30/35] docs: improve resources docs (#14136) * docs: improve resources docs * Clippy --- crates/tauri-cli/config.schema.json | 6 +- .../schemas/config.schema.json | 6 +- crates/tauri-utils/src/config.rs | 48 ++++- crates/tauri-utils/src/resources.rs | 186 ++++++++++-------- crates/tauri/src/path/mod.rs | 2 +- 5 files changed, 158 insertions(+), 90 deletions(-) diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index b14372bbc..159e36a65 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -495,7 +495,7 @@ ] }, "incognito": { - "description": "Whether or not the webview should be launched in incognito mode.\n\n ## Platform-specific:\n\n - **Android**: Unsupported.", + "description": "Whether or not the webview should be launched in incognito mode.\n\n ## Platform-specific:\n\n - **Android**: Unsupported.", "default": false, "type": "boolean" }, @@ -2071,7 +2071,7 @@ } }, "resources": { - "description": "App resources to bundle.\n Each resource is a path to a file or directory.\n Glob patterns are supported.", + "description": "App resources to bundle.\n Each resource is a path to a file or directory.\n Glob patterns are supported.\n\n ## Examples\n\n To include a list of files:\n\n ```json\n {\n \"bundle\": {\n \"resources\": [\n \"./path/to/some-file.txt\",\n \"/absolute/path/to/textfile.txt\",\n \"../relative/path/to/jsonfile.json\",\n \"some-folder/\",\n \"resources/**/*.md\"\n ]\n }\n }\n ```\n\n The bundled files will be in `$RESOURCES/` with the original directory structure preserved,\n for example: `./path/to/some-file.txt` -> `$RESOURCE/path/to/some-file.txt`\n\n To fine control where the files will get copied to, use a map instead\n\n ```json\n {\n \"bundle\": {\n \"resources\": {\n \"/absolute/path/to/textfile.txt\": \"resources/textfile.txt\",\n \"relative/path/to/jsonfile.json\": \"resources/jsonfile.json\",\n \"resources/\": \"\",\n \"docs/**/*md\": \"website-docs/\"\n }\n }\n }\n ```\n\n Note that when using glob pattern in this case, the original directory structure is not preserved,\n everything gets copied to the target directory directly\n\n See more: ", "anyOf": [ { "$ref": "#/definitions/BundleResources" @@ -2921,7 +2921,7 @@ ] }, "installerHooks": { - "description": "A path to a `.nsh` file that contains special NSIS macros to be hooked into the\n main installer.nsi script.\n\n Supported hooks are:\n - `NSIS_HOOK_PREINSTALL`: This hook runs before copying files, setting registry key values and creating shortcuts.\n - `NSIS_HOOK_POSTINSTALL`: This hook runs after the installer has finished copying all files, setting the registry keys and created shortcuts.\n - `NSIS_HOOK_PREUNINSTALL`: This hook runs before removing any files, registry keys and shortcuts.\n - `NSIS_HOOK_POSTUNINSTALL`: This hook runs after files, registry keys and shortcuts have been removed.\n\n\n ### Example\n\n ```nsh\n !macro NSIS_HOOK_PREINSTALL\n MessageBox MB_OK \"PreInstall\"\n !macroend\n\n !macro NSIS_HOOK_POSTINSTALL\n MessageBox MB_OK \"PostInstall\"\n !macroend\n\n !macro NSIS_HOOK_PREUNINSTALL\n MessageBox MB_OK \"PreUnInstall\"\n !macroend\n\n !macro NSIS_HOOK_POSTUNINSTALL\n MessageBox MB_OK \"PostUninstall\"\n !macroend\n\n ```", + "description": "A path to a `.nsh` file that contains special NSIS macros to be hooked into the\n main installer.nsi script.\n\n Supported hooks are:\n\n - `NSIS_HOOK_PREINSTALL`: This hook runs before copying files, setting registry key values and creating shortcuts.\n - `NSIS_HOOK_POSTINSTALL`: This hook runs after the installer has finished copying all files, setting the registry keys and created shortcuts.\n - `NSIS_HOOK_PREUNINSTALL`: This hook runs before removing any files, registry keys and shortcuts.\n - `NSIS_HOOK_POSTUNINSTALL`: This hook runs after files, registry keys and shortcuts have been removed.\n\n ### Example\n\n ```nsh\n !macro NSIS_HOOK_PREINSTALL\n MessageBox MB_OK \"PreInstall\"\n !macroend\n\n !macro NSIS_HOOK_POSTINSTALL\n MessageBox MB_OK \"PostInstall\"\n !macroend\n\n !macro NSIS_HOOK_PREUNINSTALL\n MessageBox MB_OK \"PreUnInstall\"\n !macroend\n\n !macro NSIS_HOOK_POSTUNINSTALL\n MessageBox MB_OK \"PostUninstall\"\n !macroend\n ```", "type": [ "string", "null" diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index b14372bbc..159e36a65 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -495,7 +495,7 @@ ] }, "incognito": { - "description": "Whether or not the webview should be launched in incognito mode.\n\n ## Platform-specific:\n\n - **Android**: Unsupported.", + "description": "Whether or not the webview should be launched in incognito mode.\n\n ## Platform-specific:\n\n - **Android**: Unsupported.", "default": false, "type": "boolean" }, @@ -2071,7 +2071,7 @@ } }, "resources": { - "description": "App resources to bundle.\n Each resource is a path to a file or directory.\n Glob patterns are supported.", + "description": "App resources to bundle.\n Each resource is a path to a file or directory.\n Glob patterns are supported.\n\n ## Examples\n\n To include a list of files:\n\n ```json\n {\n \"bundle\": {\n \"resources\": [\n \"./path/to/some-file.txt\",\n \"/absolute/path/to/textfile.txt\",\n \"../relative/path/to/jsonfile.json\",\n \"some-folder/\",\n \"resources/**/*.md\"\n ]\n }\n }\n ```\n\n The bundled files will be in `$RESOURCES/` with the original directory structure preserved,\n for example: `./path/to/some-file.txt` -> `$RESOURCE/path/to/some-file.txt`\n\n To fine control where the files will get copied to, use a map instead\n\n ```json\n {\n \"bundle\": {\n \"resources\": {\n \"/absolute/path/to/textfile.txt\": \"resources/textfile.txt\",\n \"relative/path/to/jsonfile.json\": \"resources/jsonfile.json\",\n \"resources/\": \"\",\n \"docs/**/*md\": \"website-docs/\"\n }\n }\n }\n ```\n\n Note that when using glob pattern in this case, the original directory structure is not preserved,\n everything gets copied to the target directory directly\n\n See more: ", "anyOf": [ { "$ref": "#/definitions/BundleResources" @@ -2921,7 +2921,7 @@ ] }, "installerHooks": { - "description": "A path to a `.nsh` file that contains special NSIS macros to be hooked into the\n main installer.nsi script.\n\n Supported hooks are:\n - `NSIS_HOOK_PREINSTALL`: This hook runs before copying files, setting registry key values and creating shortcuts.\n - `NSIS_HOOK_POSTINSTALL`: This hook runs after the installer has finished copying all files, setting the registry keys and created shortcuts.\n - `NSIS_HOOK_PREUNINSTALL`: This hook runs before removing any files, registry keys and shortcuts.\n - `NSIS_HOOK_POSTUNINSTALL`: This hook runs after files, registry keys and shortcuts have been removed.\n\n\n ### Example\n\n ```nsh\n !macro NSIS_HOOK_PREINSTALL\n MessageBox MB_OK \"PreInstall\"\n !macroend\n\n !macro NSIS_HOOK_POSTINSTALL\n MessageBox MB_OK \"PostInstall\"\n !macroend\n\n !macro NSIS_HOOK_PREUNINSTALL\n MessageBox MB_OK \"PreUnInstall\"\n !macroend\n\n !macro NSIS_HOOK_POSTUNINSTALL\n MessageBox MB_OK \"PostUninstall\"\n !macroend\n\n ```", + "description": "A path to a `.nsh` file that contains special NSIS macros to be hooked into the\n main installer.nsi script.\n\n Supported hooks are:\n\n - `NSIS_HOOK_PREINSTALL`: This hook runs before copying files, setting registry key values and creating shortcuts.\n - `NSIS_HOOK_POSTINSTALL`: This hook runs after the installer has finished copying all files, setting the registry keys and created shortcuts.\n - `NSIS_HOOK_PREUNINSTALL`: This hook runs before removing any files, registry keys and shortcuts.\n - `NSIS_HOOK_POSTUNINSTALL`: This hook runs after files, registry keys and shortcuts have been removed.\n\n ### Example\n\n ```nsh\n !macro NSIS_HOOK_PREINSTALL\n MessageBox MB_OK \"PreInstall\"\n !macroend\n\n !macro NSIS_HOOK_POSTINSTALL\n MessageBox MB_OK \"PostInstall\"\n !macroend\n\n !macro NSIS_HOOK_PREUNINSTALL\n MessageBox MB_OK \"PreUnInstall\"\n !macroend\n\n !macro NSIS_HOOK_POSTUNINSTALL\n MessageBox MB_OK \"PostUninstall\"\n !macroend\n ```", "type": [ "string", "null" diff --git a/crates/tauri-utils/src/config.rs b/crates/tauri-utils/src/config.rs index bd7c9db0d..bd9aac375 100644 --- a/crates/tauri-utils/src/config.rs +++ b/crates/tauri-utils/src/config.rs @@ -908,12 +908,12 @@ pub struct NsisConfig { /// main installer.nsi script. /// /// Supported hooks are: + /// /// - `NSIS_HOOK_PREINSTALL`: This hook runs before copying files, setting registry key values and creating shortcuts. /// - `NSIS_HOOK_POSTINSTALL`: This hook runs after the installer has finished copying all files, setting the registry keys and created shortcuts. /// - `NSIS_HOOK_PREUNINSTALL`: This hook runs before removing any files, registry keys and shortcuts. /// - `NSIS_HOOK_POSTUNINSTALL`: This hook runs after files, registry keys and shortcuts have been removed. /// - /// /// ### Example /// /// ```nsh @@ -932,7 +932,6 @@ pub struct NsisConfig { /// !macro NSIS_HOOK_POSTUNINSTALL /// MessageBox MB_OK "PostUninstall" /// !macroend - /// /// ``` #[serde(alias = "installer-hooks")] pub installer_hooks: Option, @@ -1286,6 +1285,47 @@ pub struct BundleConfig { /// App resources to bundle. /// Each resource is a path to a file or directory. /// Glob patterns are supported. + /// + /// ## Examples + /// + /// To include a list of files: + /// + /// ```json + /// { + /// "bundle": { + /// "resources": [ + /// "./path/to/some-file.txt", + /// "/absolute/path/to/textfile.txt", + /// "../relative/path/to/jsonfile.json", + /// "some-folder/", + /// "resources/**/*.md" + /// ] + /// } + /// } + /// ``` + /// + /// The bundled files will be in `$RESOURCES/` with the original directory structure preserved, + /// for example: `./path/to/some-file.txt` -> `$RESOURCE/path/to/some-file.txt` + /// + /// To fine control where the files will get copied to, use a map instead + /// + /// ```json + /// { + /// "bundle": { + /// "resources": { + /// "/absolute/path/to/textfile.txt": "resources/textfile.txt", + /// "relative/path/to/jsonfile.json": "resources/jsonfile.json", + /// "resources/": "", + /// "docs/**/*md": "website-docs/" + /// } + /// } + /// } + /// ``` + /// + /// Note that when using glob pattern in this case, the original directory structure is not preserved, + /// everything gets copied to the target directory directly + /// + /// See more: pub resources: Option, /// A copyright string associated with your application. pub copyright: Option, @@ -1743,9 +1783,9 @@ pub struct WindowConfig { pub window_effects: Option, /// Whether or not the webview should be launched in incognito mode. /// - /// ## Platform-specific: + /// ## Platform-specific: /// - /// - **Android**: Unsupported. + /// - **Android**: Unsupported. #[serde(default)] pub incognito: bool, /// Sets the window associated with this label to be the parent of the window to be created. diff --git a/crates/tauri-utils/src/resources.rs b/crates/tauri-utils/src/resources.rs index d13f4e421..414815e2b 100644 --- a/crates/tauri-utils/src/resources.rs +++ b/crates/tauri-utils/src/resources.rs @@ -137,7 +137,11 @@ pub struct ResourcePathsIter<'a> { allow_walk: bool, current_path: Option, + /// The key of map when `pattern_iter` is a [`PatternIter::Map`], + /// used for determining [`Resource::target`] current_pattern: Option, + /// The value of the map when `pattern_iter` is a [`PatternIter::Map`], + /// used for determining [`Resource::target`] current_dest: Option, walk_iter: Option, @@ -176,28 +180,27 @@ impl ResourcePathsIter<'_> { Ok(Resource { path: path.to_path_buf(), - target: self - .current_dest - .as_ref() - .map(|current_dest| { - // if processing a directory, preserve directory structure under current_dest - if self.walk_iter.is_some() { - let current_pattern = self.current_pattern.as_ref().unwrap(); - current_dest.join(path.strip_prefix(current_pattern).unwrap_or(path)) - } else if current_dest.components().count() == 0 { - // if current_dest is empty while processing a file pattern or glob - // we preserve the file name as it is - PathBuf::from(path.file_name().unwrap()) - } else if self.glob_iter.is_some() { - // if processing a glob and current_dest is not empty - // we put all globbed paths under current_dest - // preserving the file name as it is - current_dest.join(path.file_name().unwrap()) - } else { - current_dest.clone() - } - }) - .unwrap_or_else(|| resource_relpath(path)), + target: if let Some(current_dest) = &self.current_dest { + // if processing a directory, preserve directory structure under current_dest + if self.walk_iter.is_some() { + let current_pattern = self.current_pattern.as_ref().unwrap(); + current_dest.join(path.strip_prefix(current_pattern).unwrap_or(path)) + } else if current_dest.components().count() == 0 { + // if current_dest is empty while processing a file pattern or glob + // we preserve the file name as it is + PathBuf::from(path.file_name().unwrap()) + } else if self.glob_iter.is_some() { + // if processing a glob and current_dest is not empty + // we put all globbed paths under current_dest + // preserving the file name as it is + current_dest.join(path.file_name().unwrap()) + } else { + current_dest.clone() + } + } else { + // If `pattern_iter` is a [`PatternIter::Slice`] + resource_relpath(path) + }, }) } @@ -240,14 +243,12 @@ impl ResourcePathsIter<'_> { let pattern = match &mut self.pattern_iter { PatternIter::Slice(iter) => iter.next()?, - PatternIter::Map(iter) => match iter.next() { - Some((pattern, dest)) => { - self.current_pattern = Some(pattern.clone()); - self.current_dest = Some(resource_relpath(Path::new(dest))); - pattern - } - None => return None, - }, + PatternIter::Map(iter) => { + let (pattern, dest) = iter.next()?; + self.current_pattern = Some(pattern.clone()); + self.current_dest = Some(resource_relpath(Path::new(dest))); + pattern + } }; if pattern.contains('*') { @@ -339,39 +340,47 @@ mod tests { std::env::set_current_dir(&temp).unwrap(); let paths = [ - Path::new("src-tauri/tauri.conf.json"), - Path::new("src-tauri/some-other-json.json"), - Path::new("src-tauri/Cargo.toml"), - Path::new("src-tauri/Tauri.toml"), - Path::new("src-tauri/build.rs"), - Path::new("src/assets/javascript.svg"), - Path::new("src/assets/tauri.svg"), - Path::new("src/assets/rust.svg"), - Path::new("src/assets/lang/en.json"), - Path::new("src/assets/lang/ar.json"), - Path::new("src/sounds/lang/es.wav"), - Path::new("src/sounds/lang/fr.wav"), - Path::new("src/textures/ground/earth.tex"), - Path::new("src/textures/ground/sand.tex"), - Path::new("src/textures/water.tex"), - Path::new("src/textures/fire.tex"), - Path::new("src/tiles/sky/grey.tile"), - Path::new("src/tiles/sky/yellow.tile"), - Path::new("src/tiles/grass.tile"), - Path::new("src/tiles/stones.tile"), - Path::new("src/index.html"), - Path::new("src/style.css"), - Path::new("src/script.js"), - Path::new("src/dir/another-dir/file1.txt"), - Path::new("src/dir/another-dir2/file2.txt"), + "src-tauri/tauri.conf.json", + "src-tauri/some-other-json.json", + "src-tauri/Cargo.toml", + "src-tauri/Tauri.toml", + "src-tauri/build.rs", + "src/assets/javascript.svg", + "src/assets/tauri.svg", + "src/assets/rust.svg", + "src/assets/lang/en.json", + "src/assets/lang/ar.json", + "src/sounds/lang/es.wav", + "src/sounds/lang/fr.wav", + "src/textures/ground/earth.tex", + "src/textures/ground/sand.tex", + "src/textures/water.tex", + "src/textures/fire.tex", + "src/tiles/sky/grey.tile", + "src/tiles/sky/yellow.tile", + "src/tiles/grass.tile", + "src/tiles/stones.tile", + "src/index.html", + "src/style.css", + "src/script.js", + "src/dir/another-dir/file1.txt", + "src/dir/another-dir2/file2.txt", ]; for path in paths { + let path = Path::new(path); fs::create_dir_all(path.parent().unwrap()).unwrap(); fs::write(path, "").unwrap(); } } + fn resources_map(literal: &[(&str, &str)]) -> HashMap { + literal + .iter() + .map(|(from, to)| (from.to_string(), to.to_string())) + .collect() + } + #[test] #[serial_test::serial(resources)] fn resource_paths_iter_slice_allow_walk() { @@ -386,6 +395,8 @@ mod tests { "../src/assets".into(), "../src/index.html".into(), "../src/sounds".into(), + // Should be the same as `../src/textures/` or `../src/textures` + "../src/textures/**/*".into(), "*.toml".into(), "*.conf.json".into(), ], @@ -396,7 +407,9 @@ mod tests { .collect::>(); let expected = expected_resources(&[ + // From `../src/script.js` ("../src/script.js", "_up_/src/script.js"), + // From `../src/assets` ( "../src/assets/javascript.svg", "_up_/src/assets/javascript.svg", @@ -405,11 +418,26 @@ mod tests { ("../src/assets/rust.svg", "_up_/src/assets/rust.svg"), ("../src/assets/lang/en.json", "_up_/src/assets/lang/en.json"), ("../src/assets/lang/ar.json", "_up_/src/assets/lang/ar.json"), + // From `../src/index.html` ("../src/index.html", "_up_/src/index.html"), + // From `../src/sounds` ("../src/sounds/lang/es.wav", "_up_/src/sounds/lang/es.wav"), ("../src/sounds/lang/fr.wav", "_up_/src/sounds/lang/fr.wav"), + // From `../src/textures/**/*` + ( + "../src/textures/ground/earth.tex", + "_up_/src/textures/earth.tex", + ), + ( + "../src/textures/ground/sand.tex", + "_up_/src/textures/sand.tex", + ), + ("../src/textures/water.tex", "_up_/src/textures/water.tex"), + ("../src/textures/fire.tex", "_up_/src/textures/fire.tex"), + // From `*.toml` ("Cargo.toml", "Cargo.toml"), ("Tauri.toml", "Tauri.toml"), + // From `*.conf.json` ("tauri.conf.json", "tauri.conf.json"), ]); @@ -469,17 +497,17 @@ mod tests { let _ = std::env::set_current_dir(dir); let resources = ResourcePaths::from_map( - &std::collections::HashMap::from_iter([ - ("../src/script.js".into(), "main.js".into()), - ("../src/assets".into(), "".into()), - ("../src/index.html".into(), "frontend/index.html".into()), - ("../src/sounds".into(), "voices".into()), - ("../src/textures/*".into(), "textures".into()), - ("../src/tiles/**/*".into(), "tiles".into()), - ("*.toml".into(), "".into()), - ("*.conf.json".into(), "json".into()), - ("../non-existent-file".into(), "asd".into()), // invalid case - ("../non/*".into(), "asd".into()), // invalid case + &resources_map(&[ + ("../src/script.js", "main.js"), + ("../src/assets", ""), + ("../src/index.html", "frontend/index.html"), + ("../src/sounds", "voices"), + ("../src/textures/*", "textures"), + ("../src/tiles/**/*", "tiles"), + ("*.toml", ""), + ("*.conf.json", "json"), + ("../non-existent-file", "asd"), // invalid case + ("../non/*", "asd"), // invalid case ]), true, ) @@ -525,13 +553,13 @@ mod tests { let _ = std::env::set_current_dir(dir); let resources = ResourcePaths::from_map( - &std::collections::HashMap::from_iter([ - ("../src/script.js".into(), "main.js".into()), - ("../src/assets".into(), "".into()), - ("../src/index.html".into(), "frontend/index.html".into()), - ("../src/sounds".into(), "voices".into()), - ("*.toml".into(), "".into()), - ("*.conf.json".into(), "json".into()), + &resources_map(&[ + ("../src/script.js", "main.js"), + ("../src/assets", ""), + ("../src/index.html", "frontend/index.html"), + ("../src/sounds", "voices"), + ("*.toml", ""), + ("*.conf.json", "json"), ]), false, ) @@ -564,15 +592,15 @@ mod tests { let _ = std::env::set_current_dir(dir); let resources = ResourcePaths::from_map( - &std::collections::HashMap::from_iter([ - ("../non-existent-file".into(), "file".into()), - ("../non-existent-dir".into(), "dir".into()), + &resources_map(&[ + ("../non-existent-file", "file"), + ("../non-existent-dir", "dir"), // exists but not allowed to walk - ("../src".into(), "dir2".into()), + ("../src", "dir2"), // doesn't exist but it is a glob and will return an error - ("../non-existent-glob-dir/*".into(), "glob".into()), + ("../non-existent-glob-dir/*", "glob"), // exists but only contains directories and will not produce any values - ("../src/dir/*".into(), "dir3".into()), + ("../src/dir/*", "dir3"), ]), false, ) diff --git a/crates/tauri/src/path/mod.rs b/crates/tauri/src/path/mod.rs index b6d2c6ea4..f504435c5 100644 --- a/crates/tauri/src/path/mod.rs +++ b/crates/tauri/src/path/mod.rs @@ -124,7 +124,7 @@ pub enum BaseDirectory { /// Resolves to [`crate::path::PathResolver::video_dir`]. Video = 10, /// The Resource directory. - /// Resolves to the resource directory of this app. + /// Resolves to [`crate::path::PathResolver::resource_dir`]. Resource = 11, /// A temporary directory. /// Resolves to [`std::env::temp_dir`]. From 80eadb7387459639037e3a279c61c9631b1dafe7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 12:44:16 -0300 Subject: [PATCH 31/35] apply version updates (#14100) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changes/ensure-targets-mobile.md | 6 ------ .changes/fix-cli-deno.md | 6 ------ .changes/fix-deno-cli-ios.md | 6 ------ .changes/fix-emulator-name.md | 6 ------ .changes/fix-ios-sim-intel.md | 6 ------ .../improve-local-network-error-message.md | 5 ----- .changes/map-export-method-deprecated.md | 6 ------ .changes/retain-rust-vars.md | 6 ------ .changes/skip-deployment-target-in-dev.md | 7 ------- Cargo.lock | 12 +++++------ crates/tauri-build/CHANGELOG.md | 6 ++++++ crates/tauri-build/Cargo.toml | 2 +- crates/tauri-cli/CHANGELOG.md | 16 +++++++++++++++ crates/tauri-cli/Cargo.toml | 2 +- crates/tauri-cli/config.schema.json | 2 +- crates/tauri-cli/metadata-v2.json | 6 +++--- .../schemas/config.schema.json | 2 +- crates/tauri/CHANGELOG.md | 10 ++++++++++ crates/tauri/Cargo.toml | 4 ++-- packages/cli/CHANGELOG.md | 20 +++++++++++++++++++ packages/cli/package.json | 2 +- 21 files changed, 68 insertions(+), 70 deletions(-) delete mode 100644 .changes/ensure-targets-mobile.md delete mode 100644 .changes/fix-cli-deno.md delete mode 100644 .changes/fix-deno-cli-ios.md delete mode 100644 .changes/fix-emulator-name.md delete mode 100644 .changes/fix-ios-sim-intel.md delete mode 100644 .changes/improve-local-network-error-message.md delete mode 100644 .changes/map-export-method-deprecated.md delete mode 100644 .changes/retain-rust-vars.md delete mode 100644 .changes/skip-deployment-target-in-dev.md diff --git a/.changes/ensure-targets-mobile.md b/.changes/ensure-targets-mobile.md deleted file mode 100644 index b4a091c6e..000000000 --- a/.changes/ensure-targets-mobile.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@tauri-apps/cli": patch:enhance -"tauri-cli": patch:enhance ---- - -Ensure Rust targets for mobile are installed when running the dev and build commands (previously only checked on init). diff --git a/.changes/fix-cli-deno.md b/.changes/fix-cli-deno.md deleted file mode 100644 index c9a49a50b..000000000 --- a/.changes/fix-cli-deno.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@tauri-apps/cli": patch:bug -"tauri-cli": patch:bug ---- - -Fix usage with Deno failing with `ReferenceError: require is not defined`. diff --git a/.changes/fix-deno-cli-ios.md b/.changes/fix-deno-cli-ios.md deleted file mode 100644 index 8e2b6698c..000000000 --- a/.changes/fix-deno-cli-ios.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri-cli": patch:bug -"@tauri-apps/cli": patch:bug ---- - -Fixes running `ios` commands with `deno` crashing due to incorrect current working directory resolution. diff --git a/.changes/fix-emulator-name.md b/.changes/fix-emulator-name.md deleted file mode 100644 index 20bf512ec..000000000 --- a/.changes/fix-emulator-name.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri-cli": patch:bug -"@tauri-apps/cli": patch:bug ---- - -Fixes empty device name when using an Android emulator causing the emulator to never be detected as running. diff --git a/.changes/fix-ios-sim-intel.md b/.changes/fix-ios-sim-intel.md deleted file mode 100644 index 93de24aa8..000000000 --- a/.changes/fix-ios-sim-intel.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@tauri-apps/cli": patch:enhance -"tauri-cli": patch:enhance ---- - -Fix iOS dev and build targeting the simulator on Intel machines. diff --git a/.changes/improve-local-network-error-message.md b/.changes/improve-local-network-error-message.md deleted file mode 100644 index 34d0f837f..000000000 --- a/.changes/improve-local-network-error-message.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri": patch:enhance ---- - -Improve error message for request errors on iOS when local network permission has been denied and the app tries to reach the development server. diff --git a/.changes/map-export-method-deprecated.md b/.changes/map-export-method-deprecated.md deleted file mode 100644 index 6369d1209..000000000 --- a/.changes/map-export-method-deprecated.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri-cli": patch:bug -"@tauri-apps/cli": patch:bug ---- - -Use the correct export method on Xcode < 15.4. diff --git a/.changes/retain-rust-vars.md b/.changes/retain-rust-vars.md deleted file mode 100644 index 4e12f0430..000000000 --- a/.changes/retain-rust-vars.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@tauri-apps/cli": patch:enhance -"tauri-cli": patch:enhance ---- - -Retain `RUST_*` environment variables when running the mobile commands. diff --git a/.changes/skip-deployment-target-in-dev.md b/.changes/skip-deployment-target-in-dev.md deleted file mode 100644 index fcd06572a..000000000 --- a/.changes/skip-deployment-target-in-dev.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -tauri-build: patch:enhance -tauri-cli: patch:enhance -'@tauri-apps/cli': patch:enhance ---- - -Tauri now ignores `macOS.minimumSystemVersion` in `tauri dev` to prevent forced rebuilds of macOS specific dependencies when using something like `rust-analyzer` at the same time as `tauri dev`. diff --git a/Cargo.lock b/Cargo.lock index 8e8d93be1..5b968e1dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1319,7 +1319,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] @@ -4311,7 +4311,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -8484,7 +8484,7 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.8.4" +version = "2.8.5" dependencies = [ "anyhow", "bytes", @@ -8545,7 +8545,7 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.4.0" +version = "2.4.1" dependencies = [ "anyhow", "cargo_toml", @@ -8613,7 +8613,7 @@ dependencies = [ [[package]] name = "tauri-cli" -version = "2.8.3" +version = "2.8.4" dependencies = [ "anyhow", "ar", @@ -10311,7 +10311,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/crates/tauri-build/CHANGELOG.md b/crates/tauri-build/CHANGELOG.md index c0f6ae6ca..5b3c82913 100644 --- a/crates/tauri-build/CHANGELOG.md +++ b/crates/tauri-build/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[2.4.1] + +### Enhancements + +- [`c23bec62d`](https://www.github.com/tauri-apps/tauri/commit/c23bec62d6d5724798869681aa1534423aae28e2) ([#14083](https://www.github.com/tauri-apps/tauri/pull/14083) by [@FabianLars](https://www.github.com/tauri-apps/tauri/../../FabianLars)) Tauri now ignores `macOS.minimumSystemVersion` in `tauri dev` to prevent forced rebuilds of macOS specific dependencies when using something like `rust-analyzer` at the same time as `tauri dev`. + ## \[2.4.0] ### Dependencies diff --git a/crates/tauri-build/Cargo.toml b/crates/tauri-build/Cargo.toml index 957c6c065..c52bd7ee7 100644 --- a/crates/tauri-build/Cargo.toml +++ b/crates/tauri-build/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-build" -version = "2.4.0" +version = "2.4.1" description = "build time code to pair with https://crates.io/crates/tauri" exclude = ["CHANGELOG.md", "/target"] readme = "README.md" diff --git a/crates/tauri-cli/CHANGELOG.md b/crates/tauri-cli/CHANGELOG.md index 65a67d0e7..5d539f82a 100644 --- a/crates/tauri-cli/CHANGELOG.md +++ b/crates/tauri-cli/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## \[2.8.4] + +### Enhancements + +- [`f70b28529`](https://www.github.com/tauri-apps/tauri/commit/f70b28529d226a2dec2f41709d8934f8f5adab25) ([#14093](https://www.github.com/tauri-apps/tauri/pull/14093) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Ensure Rust targets for mobile are installed when running the dev and build commands (previously only checked on init). +- [`a9b342125`](https://www.github.com/tauri-apps/tauri/commit/a9b342125d5ac1bc9a4b2e8b5f73e8ca3cbcb8b2) ([#14114](https://www.github.com/tauri-apps/tauri/pull/14114) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fix iOS dev and build targeting the simulator on Intel machines. +- [`61b9b681e`](https://www.github.com/tauri-apps/tauri/commit/61b9b681e88067a53b79d2318ae005dc25addcd6) ([#14111](https://www.github.com/tauri-apps/tauri/pull/14111) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Retain `RUST_*` environment variables when running the mobile commands. +- [`c23bec62d`](https://www.github.com/tauri-apps/tauri/commit/c23bec62d6d5724798869681aa1534423aae28e2) ([#14083](https://www.github.com/tauri-apps/tauri/pull/14083) by [@FabianLars](https://www.github.com/tauri-apps/tauri/../../FabianLars)) Tauri now ignores `macOS.minimumSystemVersion` in `tauri dev` to prevent forced rebuilds of macOS specific dependencies when using something like `rust-analyzer` at the same time as `tauri dev`. + +### Bug Fixes + +- [`c37a29833`](https://www.github.com/tauri-apps/tauri/commit/c37a298331d6d744b15d32d55a2db83c884a3d6a) ([#14112](https://www.github.com/tauri-apps/tauri/pull/14112) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fix usage with Deno failing with `ReferenceError: require is not defined`. +- [`bcf000c0a`](https://www.github.com/tauri-apps/tauri/commit/bcf000c0a8607eedf488fb949b982f519abda43d) ([#14110](https://www.github.com/tauri-apps/tauri/pull/14110) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes running `ios` commands with `deno` crashing due to incorrect current working directory resolution. +- [`7db7142f9`](https://www.github.com/tauri-apps/tauri/commit/7db7142f9ff7dc2f5719602e199b77129ceb19d3) ([#14119](https://www.github.com/tauri-apps/tauri/pull/14119) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes empty device name when using an Android emulator causing the emulator to never be detected as running. +- [`956b4fd6f`](https://www.github.com/tauri-apps/tauri/commit/956b4fd6ffbb4312123b107ca96c87a001359b9d) ([#14106](https://www.github.com/tauri-apps/tauri/pull/14106) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Use the correct export method on Xcode < 15.4. + ## \[2.8.3] ### Bug Fixes diff --git a/crates/tauri-cli/Cargo.toml b/crates/tauri-cli/Cargo.toml index 46d095f5c..573237e93 100644 --- a/crates/tauri-cli/Cargo.toml +++ b/crates/tauri-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-cli" -version = "2.8.3" +version = "2.8.4" authors = ["Tauri Programme within The Commons Conservancy"] edition = "2021" rust-version = "1.77.2" diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index 159e36a65..599642243 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://schema.tauri.app/config/2.8.4", + "$id": "https://schema.tauri.app/config/2.8.5", "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", diff --git a/crates/tauri-cli/metadata-v2.json b/crates/tauri-cli/metadata-v2.json index 7e9ac818c..e68c243f6 100644 --- a/crates/tauri-cli/metadata-v2.json +++ b/crates/tauri-cli/metadata-v2.json @@ -1,9 +1,9 @@ { "cli.js": { - "version": "2.8.3", + "version": "2.8.4", "node": ">= 10.0.0" }, - "tauri": "2.8.4", - "tauri-build": "2.4.0", + "tauri": "2.8.5", + "tauri-build": "2.4.1", "tauri-plugin": "2.4.0" } diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index 159e36a65..599642243 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://schema.tauri.app/config/2.8.4", + "$id": "https://schema.tauri.app/config/2.8.5", "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", diff --git a/crates/tauri/CHANGELOG.md b/crates/tauri/CHANGELOG.md index 01974c2c5..695022218 100644 --- a/crates/tauri/CHANGELOG.md +++ b/crates/tauri/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## \[2.8.5] + +### Enhancements + +- [`07e134f70`](https://www.github.com/tauri-apps/tauri/commit/07e134f70e3a65424641f1b384a26bf059fd9c56) ([#14107](https://www.github.com/tauri-apps/tauri/pull/14107) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Improve error message for request errors on iOS when local network permission has been denied and the app tries to reach the development server. + +### Dependencies + +- Upgraded to `tauri-build@2.4.1` + ## \[2.8.4] ### Bug Fixes diff --git a/crates/tauri/Cargo.toml b/crates/tauri/Cargo.toml index b0a4a5966..7d453f8e7 100644 --- a/crates/tauri/Cargo.toml +++ b/crates/tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri" -version = "2.8.4" +version = "2.8.5" description = "Make tiny, secure apps for all desktop platforms with Tauri" exclude = ["/test", "/.scripts", "CHANGELOG.md", "/target"] readme = "README.md" @@ -164,7 +164,7 @@ objc2-ui-kit = { version = "0.3.0", default-features = false, features = [ [build-dependencies] glob = "0.3" heck = "0.5" -tauri-build = { path = "../tauri-build/", default-features = false, version = "2.4.0" } +tauri-build = { path = "../tauri-build/", default-features = false, version = "2.4.1" } tauri-utils = { path = "../tauri-utils/", version = "2.7.0", features = [ "build", ] } diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index cfc07d4cc..642a5043b 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## \[2.8.4] + +### Enhancements + +- [`f70b28529`](https://www.github.com/tauri-apps/tauri/commit/f70b28529d226a2dec2f41709d8934f8f5adab25) ([#14093](https://www.github.com/tauri-apps/tauri/pull/14093) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Ensure Rust targets for mobile are installed when running the dev and build commands (previously only checked on init). +- [`a9b342125`](https://www.github.com/tauri-apps/tauri/commit/a9b342125d5ac1bc9a4b2e8b5f73e8ca3cbcb8b2) ([#14114](https://www.github.com/tauri-apps/tauri/pull/14114) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fix iOS dev and build targeting the simulator on Intel machines. +- [`61b9b681e`](https://www.github.com/tauri-apps/tauri/commit/61b9b681e88067a53b79d2318ae005dc25addcd6) ([#14111](https://www.github.com/tauri-apps/tauri/pull/14111) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Retain `RUST_*` environment variables when running the mobile commands. +- [`c23bec62d`](https://www.github.com/tauri-apps/tauri/commit/c23bec62d6d5724798869681aa1534423aae28e2) ([#14083](https://www.github.com/tauri-apps/tauri/pull/14083) by [@FabianLars](https://www.github.com/tauri-apps/tauri/../../FabianLars)) Tauri now ignores `macOS.minimumSystemVersion` in `tauri dev` to prevent forced rebuilds of macOS specific dependencies when using something like `rust-analyzer` at the same time as `tauri dev`. + +### Bug Fixes + +- [`c37a29833`](https://www.github.com/tauri-apps/tauri/commit/c37a298331d6d744b15d32d55a2db83c884a3d6a) ([#14112](https://www.github.com/tauri-apps/tauri/pull/14112) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fix usage with Deno failing with `ReferenceError: require is not defined`. +- [`bcf000c0a`](https://www.github.com/tauri-apps/tauri/commit/bcf000c0a8607eedf488fb949b982f519abda43d) ([#14110](https://www.github.com/tauri-apps/tauri/pull/14110) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes running `ios` commands with `deno` crashing due to incorrect current working directory resolution. +- [`7db7142f9`](https://www.github.com/tauri-apps/tauri/commit/7db7142f9ff7dc2f5719602e199b77129ceb19d3) ([#14119](https://www.github.com/tauri-apps/tauri/pull/14119) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes empty device name when using an Android emulator causing the emulator to never be detected as running. +- [`956b4fd6f`](https://www.github.com/tauri-apps/tauri/commit/956b4fd6ffbb4312123b107ca96c87a001359b9d) ([#14106](https://www.github.com/tauri-apps/tauri/pull/14106) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Use the correct export method on Xcode < 15.4. + +### Dependencies + +- Upgraded to `tauri-cli@2.8.4` + ## \[2.8.3] ### Bug Fixes diff --git a/packages/cli/package.json b/packages/cli/package.json index aa2e9f264..90731b6b1 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/cli", - "version": "2.8.3", + "version": "2.8.4", "description": "Command line interface for building Tauri apps", "type": "commonjs", "funding": { From f6622a3e342f5dd5fb3cf6e0f79fb309a10e9b3d Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Mon, 1 Sep 2025 13:55:51 -0300 Subject: [PATCH 32/35] feat(cli): prompt to install iOS runtime if needed, closes #9186 (#14129) * feat(cli): prompt to install iOS runtime if needed, closes #9186 * ensure runtime is installed * only when running directly * use starts_with --- .changes/install-ios-platform.md | 6 +++ crates/tauri-cli/src/mobile/ios/build.rs | 6 ++- crates/tauri-cli/src/mobile/ios/dev.rs | 7 +++- crates/tauri-cli/src/mobile/ios/mod.rs | 53 ++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 .changes/install-ios-platform.md diff --git a/.changes/install-ios-platform.md b/.changes/install-ios-platform.md new file mode 100644 index 000000000..907f411e5 --- /dev/null +++ b/.changes/install-ios-platform.md @@ -0,0 +1,6 @@ +--- +"@tauri-apps/cli": minor:enhance +"tauri-cli": minor:enhance +--- + +Prompt to install the iOS platform if it isn't installed yet. diff --git a/crates/tauri-cli/src/mobile/ios/build.rs b/crates/tauri-cli/src/mobile/ios/build.rs index 7145a8ebe..4f0de4f37 100644 --- a/crates/tauri-cli/src/mobile/ios/build.rs +++ b/crates/tauri-cli/src/mobile/ios/build.rs @@ -15,7 +15,7 @@ use crate::{ flock, }, interface::{AppInterface, Interface, Options as InterfaceOptions}, - mobile::{write_options, CliOptions}, + mobile::{ios::ensure_ios_runtime_installed, write_options, CliOptions}, ConfigValue, Result, }; use clap::{ArgAction, Parser, ValueEnum}; @@ -224,6 +224,10 @@ pub fn command(options: Options, noise_level: NoiseLevel) -> Result<()> { let mut env = env()?; + if !options.open { + ensure_ios_runtime_installed()?; + } + let mut export_options_plist = plist::Dictionary::new(); if let Some(method) = options.export_method { let xcode_version = diff --git a/crates/tauri-cli/src/mobile/ios/dev.rs b/crates/tauri-cli/src/mobile/ios/dev.rs index 67608a84d..5b48e7101 100644 --- a/crates/tauri-cli/src/mobile/ios/dev.rs +++ b/crates/tauri-cli/src/mobile/ios/dev.rs @@ -15,7 +15,8 @@ use crate::{ }, interface::{AppInterface, Interface, MobileOptions, Options as InterfaceOptions}, mobile::{ - use_network_address_for_dev_url, write_options, CliOptions, DevChild, DevHost, DevProcess, + ios::ensure_ios_runtime_installed, use_network_address_for_dev_url, write_options, CliOptions, + DevChild, DevHost, DevProcess, }, ConfigValue, Result, }; @@ -166,6 +167,10 @@ fn run_command(options: Options, noise_level: NoiseLevel) -> Result<()> { } }; + if device.is_some() { + ensure_ios_runtime_installed()?; + } + let mut dev_options: DevOptions = options.clone().into(); let target_triple = device .as_ref() diff --git a/crates/tauri-cli/src/mobile/ios/mod.rs b/crates/tauri-cli/src/mobile/ios/mod.rs index 93e2a8ede..ea55d9862 100644 --- a/crates/tauri-cli/src/mobile/ios/mod.rs +++ b/crates/tauri-cli/src/mobile/ios/mod.rs @@ -19,6 +19,7 @@ use cargo_mobile2::{ util::{prompt, relativize_path}, }; use clap::{Parser, Subcommand}; +use serde::Deserialize; use sublime_fuzzy::best_match; use tauri_utils::resources::ResourcePaths; @@ -325,12 +326,23 @@ fn connected_device_prompt<'a>(env: &'_ Env, target: Option<&str>) -> Result, +} + +#[derive(Deserialize)] +struct InstalledRuntime { + name: String, +} + fn simulator_prompt(env: &'_ Env, target: Option<&str>) -> Result { let simulator_list = device::list_simulators(env).map_err(|cause| { anyhow::anyhow!("Failed to detect connected iOS Simulator devices: {cause}") @@ -367,6 +379,19 @@ fn simulator_prompt(env: &'_ Env, target: Option<&str>) -> Result(env: &'_ Env, target: Option<&str>) -> Result> { } } +fn ensure_ios_runtime_installed() -> Result<()> { + let installed_platforms_json = + duct::cmd("xcrun", ["simctl", "list", "runtimes", "--json"]).read()?; + let installed_platforms: InstalledRuntimesList = + serde_json::from_str(&installed_platforms_json).unwrap_or_default(); + if !installed_platforms + .runtimes + .iter() + .any(|r| r.name.starts_with("iOS")) + { + log::warn!("iOS platform not installed"); + let install_ios = crate::helpers::prompts::confirm( + "Would you like to install the latest iOS runtime?", + Some(false), + ) + .unwrap_or_default(); + if install_ios { + duct::cmd("xcodebuild", ["-downloadPlatform", "iOS"]) + .stdout_file(os_pipe::dup_stdout().unwrap()) + .stderr_file(os_pipe::dup_stderr().unwrap()) + .run()?; + } else { + anyhow::bail!("iOS platform not installed"); + } + } + Ok(()) +} + fn detect_target_ok<'a>(env: &Env) -> Option<&'a Target<'a>> { device_prompt(env, None).map(|device| device.target()).ok() } From 1a6627ee7d085a4e66784e2705254714d68c7244 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Mon, 1 Sep 2025 13:55:59 -0300 Subject: [PATCH 33/35] feat(cli): set default log level when adding the log plugin (#14122) * feat(cli): set default log level when adding the log plugin needs https://github.com/tauri-apps/plugins-workspace/pull/2965 ref #14075 * Update crates/tauri-cli/src/add.rs --- .changes/default-log-level.md | 6 ++++++ crates/tauri-cli/src/add.rs | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 .changes/default-log-level.md diff --git a/.changes/default-log-level.md b/.changes/default-log-level.md new file mode 100644 index 000000000..7b3f0ca3e --- /dev/null +++ b/.changes/default-log-level.md @@ -0,0 +1,6 @@ +--- +"@tauri-apps/cli": patch:enhance +"tauri-cli": patch:enhance +--- + +Set a default log level filter when running `tauri add log`. diff --git a/crates/tauri-cli/src/add.rs b/crates/tauri-cli/src/add.rs index aed598ec4..302bd026c 100644 --- a/crates/tauri-cli/src/add.rs +++ b/crates/tauri-cli/src/add.rs @@ -132,6 +132,8 @@ pub fn run(options: Options) -> Result<()> { "Builder::new(todo!()).build()" } else if plugin == "single-instance" { "init(|app, args, cwd| {})" + } else if plugin == "log" { + "Builder::new().level(tauri_plugin_log::log::LevelFilter::Info).build()" } else if metadata.builder { "Builder::new().build()" } else { From 59089723fc20d66f3f305f2008adeb279bf87462 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Mon, 1 Sep 2025 18:56:26 +0200 Subject: [PATCH 34/35] feat(api): add dataDirectory setting config (#14091) * feat(api): ad dataDirectory setting config * changefile fmt * chain, log if dirs::data_local_dir fails --------- Co-authored-by: Lucas Nogueira --- .changes/data-dir-js.md | 6 +++ crates/tauri-cli/config.schema.json | 21 ++++++++++ .../schemas/config.schema.json | 21 ++++++++++ crates/tauri-utils/src/config.rs | 33 ++++++++++++++- crates/tauri/src/webview/mod.rs | 41 ++++++++++++++++++- packages/api/src/webview.ts | 27 ++++++++++++ 6 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 .changes/data-dir-js.md diff --git a/.changes/data-dir-js.md b/.changes/data-dir-js.md new file mode 100644 index 000000000..9fff3317d --- /dev/null +++ b/.changes/data-dir-js.md @@ -0,0 +1,6 @@ +--- +"tauri-utils": "minor:enhance" +"@tauri-apps/api": "minor:enhance" +--- + +Added a config to set a data_directory relative to the app-specific data dir in JavaScript and `tauri.conf.json`. diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index 599642243..75840cf31 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -572,6 +572,27 @@ "description": "Allows disabling the input accessory view on iOS.\n\n The accessory view is the view that appears above the keyboard when a text input element is focused.\n It usually displays a view with \"Done\", \"Next\" buttons.", "default": false, "type": "boolean" + }, + "dataDirectory": { + "description": "Set a custom path for the webview's data directory (localStorage, cache, etc.) **relative to [`appDataDir()`]/${label}**.\n\n To set absolute paths, use [`WebviewWindowBuilder::data_directory`](https://docs.rs/tauri/2/tauri/webview/struct.WebviewWindowBuilder.html#method.data_directory)\n\n #### Platform-specific:\n\n - **Windows**: WebViews with different values for settings like `additionalBrowserArgs`, `browserExtensionsEnabled` or `scrollBarStyle` must have different data directories.\n - **macOS / iOS**: Unsupported, use `dataStoreIdentifier` instead.\n - **Android**: Unsupported.", + "type": [ + "string", + "null" + ] + }, + "dataStoreIdentifier": { + "description": "Initialize the WebView with a custom data store identifier. This can be seen as a replacement for `dataDirectory` which is unavailable in WKWebView.\n See https://developer.apple.com/documentation/webkit/wkwebsitedatastore/init(foridentifier:)?language=objc\n\n The array must contain 16 u8 numbers.\n\n #### Platform-specific:\n\n - **iOS**: Supported since version 17.0+.\n - **macOS**: Supported since version 14.0+.\n - **Windows / Linux / Android**: Unsupported.", + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "format": "uint8", + "minimum": 0.0 + }, + "maxItems": 16, + "minItems": 16 } }, "additionalProperties": false diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index 599642243..75840cf31 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -572,6 +572,27 @@ "description": "Allows disabling the input accessory view on iOS.\n\n The accessory view is the view that appears above the keyboard when a text input element is focused.\n It usually displays a view with \"Done\", \"Next\" buttons.", "default": false, "type": "boolean" + }, + "dataDirectory": { + "description": "Set a custom path for the webview's data directory (localStorage, cache, etc.) **relative to [`appDataDir()`]/${label}**.\n\n To set absolute paths, use [`WebviewWindowBuilder::data_directory`](https://docs.rs/tauri/2/tauri/webview/struct.WebviewWindowBuilder.html#method.data_directory)\n\n #### Platform-specific:\n\n - **Windows**: WebViews with different values for settings like `additionalBrowserArgs`, `browserExtensionsEnabled` or `scrollBarStyle` must have different data directories.\n - **macOS / iOS**: Unsupported, use `dataStoreIdentifier` instead.\n - **Android**: Unsupported.", + "type": [ + "string", + "null" + ] + }, + "dataStoreIdentifier": { + "description": "Initialize the WebView with a custom data store identifier. This can be seen as a replacement for `dataDirectory` which is unavailable in WKWebView.\n See https://developer.apple.com/documentation/webkit/wkwebsitedatastore/init(foridentifier:)?language=objc\n\n The array must contain 16 u8 numbers.\n\n #### Platform-specific:\n\n - **iOS**: Supported since version 17.0+.\n - **macOS**: Supported since version 14.0+.\n - **Windows / Linux / Android**: Unsupported.", + "type": [ + "array", + "null" + ], + "items": { + "type": "integer", + "format": "uint8", + "minimum": 0.0 + }, + "maxItems": 16, + "minItems": 16 } }, "additionalProperties": false diff --git a/crates/tauri-utils/src/config.rs b/crates/tauri-utils/src/config.rs index bd9aac375..372792f1f 100644 --- a/crates/tauri-utils/src/config.rs +++ b/crates/tauri-utils/src/config.rs @@ -1894,6 +1894,31 @@ pub struct WindowConfig { alias = "disable_input_accessory_view" )] pub disable_input_accessory_view: bool, + /// + /// Set a custom path for the webview's data directory (localStorage, cache, etc.) **relative to [`appDataDir()`]/${label}**. + /// + /// To set absolute paths, use [`WebviewWindowBuilder::data_directory`](https://docs.rs/tauri/2/tauri/webview/struct.WebviewWindowBuilder.html#method.data_directory) + /// + /// #### Platform-specific: + /// + /// - **Windows**: WebViews with different values for settings like `additionalBrowserArgs`, `browserExtensionsEnabled` or `scrollBarStyle` must have different data directories. + /// - **macOS / iOS**: Unsupported, use `dataStoreIdentifier` instead. + /// - **Android**: Unsupported. + #[serde(default, alias = "data-directory")] + pub data_directory: Option, + /// + /// Initialize the WebView with a custom data store identifier. This can be seen as a replacement for `dataDirectory` which is unavailable in WKWebView. + /// See https://developer.apple.com/documentation/webkit/wkwebsitedatastore/init(foridentifier:)?language=objc + /// + /// The array must contain 16 u8 numbers. + /// + /// #### Platform-specific: + /// + /// - **iOS**: Supported since version 17.0+. + /// - **macOS**: Supported since version 14.0+. + /// - **Windows / Linux / Android**: Unsupported. + #[serde(default, alias = "data-store-identifier")] + pub data_store_identifier: Option<[u8; 16]>, } impl Default for WindowConfig { @@ -1953,6 +1978,8 @@ impl Default for WindowConfig { javascript_disabled: false, allow_link_preview: true, disable_input_accessory_view: false, + data_directory: None, + data_store_identifier: None, } } } @@ -3459,6 +3486,8 @@ mod build { let javascript_disabled = self.javascript_disabled; let allow_link_preview = self.allow_link_preview; let disable_input_accessory_view = self.disable_input_accessory_view; + let data_directory = opt_lit(self.data_directory.as_ref().map(path_buf_lit).as_ref()); + let data_store_identifier = opt_vec_lit(self.data_store_identifier, identity); literal_struct!( tokens, @@ -3516,7 +3545,9 @@ mod build { background_throttling, javascript_disabled, allow_link_preview, - disable_input_accessory_view + disable_input_accessory_view, + data_directory, + data_store_identifier ); } } diff --git a/crates/tauri/src/webview/mod.rs b/crates/tauri/src/webview/mod.rs index 6be175d90..0fb6fd977 100644 --- a/crates/tauri/src/webview/mod.rs +++ b/crates/tauri/src/webview/mod.rs @@ -42,6 +42,7 @@ use crate::{ InvokeError, InvokeMessage, InvokeResolver, Origin, OwnedInvokeResponder, ScopeObject, }, manager::AppManager, + path::SafePathBuf, sealed::{ManagerBase, RuntimeOrDispatch}, AppHandle, Emitter, Event, EventId, EventLoopMessage, EventName, Listener, Manager, ResourceTable, Runtime, Window, @@ -387,9 +388,47 @@ async fn create_window(app: tauri::AppHandle) { /// /// [the Webview2 issue]: https://github.com/tauri-apps/wry/issues/583 pub fn from_config(config: &WindowConfig) -> Self { + let mut config = config.to_owned(); + + if let Some(data_directory) = &config.data_directory { + let resolve_data_dir_res = dirs::data_local_dir() + .or({ + #[cfg(feature = "tracing")] + tracing::error!("failed to resolve data directory"); + None + }) + .and_then(|local_dir| { + SafePathBuf::new(data_directory.clone()) + .inspect_err(|_err| { + #[cfg(feature = "tracing")] + tracing::error!( + "data_directory `{}` is not a safe path, ignoring config. Validation error was: {_err}", + data_directory.display() + ); + }) + .map(|p| (local_dir, p)) + .ok() + }) + .and_then(|(local_dir, data_directory)| { + if data_directory.as_ref().is_relative() { + Some(local_dir.join(&config.label).join(data_directory.as_ref())) + } else { + #[cfg(feature = "tracing")] + tracing::error!( + "data_directory `{}` is not a relative path, ignoring config.", + data_directory.display() + ); + None + } + }); + if let Some(resolved_data_directory) = resolve_data_dir_res { + config.data_directory = Some(resolved_data_directory); + } + } + Self { label: config.label.clone(), - webview_attributes: WebviewAttributes::from(config), + webview_attributes: WebviewAttributes::from(&config), web_resource_request_handler: None, navigation_handler: None, new_window_handler: None, diff --git a/packages/api/src/webview.ts b/packages/api/src/webview.ts index c691669f1..d5998cb61 100644 --- a/packages/api/src/webview.ts +++ b/packages/api/src/webview.ts @@ -854,6 +854,33 @@ interface WebviewOptions { * It usually displays a view with "Done", "Next" buttons. */ disableInputAccessoryView?: boolean + /** + * Set a custom path for the webview's data directory (localStorage, cache, etc.) **relative to [`appDataDir()`]/${label}**. + * For security reasons, paths outside of that location can only be configured on the Rust side. + * + * #### Platform-specific: + * + * - **Windows**: WebViews with different values for settings like `additionalBrowserArgs`, `browserExtensionsEnabled` or `scrollBarStyle` must have different data directories. + * - **macOS / iOS**: Unsupported, use `dataStoreIdentifier` instead. + * - **Android**: Unsupported. + * + * @since 2.9.0 + */ + dataDirectory?: string + /** + * Initialize the WebView with a custom data store identifier. This can be seen as a replacement for `dataDirectory` which is unavailable in WKWebView. + * See https://developer.apple.com/documentation/webkit/wkwebsitedatastore/init(foridentifier:)?language=objc + * + * The array must contain 16 u8 numbers. + * + * #### Platform-specific: + * + * - **macOS / iOS**: Available on macOS >= 14 and iOS >= 17 + * - **Windows / Linux / Android**: Unsupported. + * + * @since 2.9.0 + */ + dataStoreIdentifier?: number[] } export { Webview, getCurrentWebview, getAllWebviews } From 2a06d10066a806e392efe8bfb16d943ee0b0b61d Mon Sep 17 00:00:00 2001 From: SHIGRAF SALIK <140247389+ShigrafS@users.noreply.github.com> Date: Mon, 1 Sep 2025 22:29:55 +0530 Subject: [PATCH 35/35] =?UTF-8?q?feat(bundle):=20add=20--no-sign=20flag=20?= =?UTF-8?q?to=20skip=20code=20signing=20in=20bundling=20pro=E2=80=A6=20(#1?= =?UTF-8?q?4052)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(bundle): add --no-sign flag to skip code signing in bundling process - Introduce a o_sign option in bundle settings to allow skipping code signing - Update macOS and Windows bundler implementations to respect the flag - Wire up CLI option --no-sign to control signing behavior during bundling - Add necessary config and type changes to propagate the flag throughout bundler Signed-off-by: ShigrafS * ci: added yml for github action testing Signed-off-by: ShigrafS * fix: fixed field 'digest_algorithm' is already declared error Signed-off-by: ShigrafS * ci: updated to test the new features as well Signed-off-by: ShigrafS * ci: fixed yml issue Signed-off-by: ShigrafS * fix: fixed missing parameter issue in android sign.rs Signed-off-by: ShigrafS * chore: apply linting Signed-off-by: ShigrafS * chore: remove redundant files Signed-off-by: ShigrafS * chore: revert indentations Signed-off-by: ShigrafS * fix: added parameters to ios mobile build.rs Signed-off-by: ShigrafS * docs: updated documentation for settigs.rs Signed-off-by: ShigrafS * docs(cli): add documentation for o_sign flag in build options Signed-off-by: ShigrafS * chore: apply cargo fmt Signed-off-by: ShigrafS * docs: added CHANGES.md Signed-off-by: ShigrafS * refactor(bundler): make o_sign private and add getter Signed-off-by: ShigrafS * fix: minor error Signed-off-by: ShigrafS * refactor: revert build_benchmark_jsons.rs Signed-off-by: ShigrafS * impl for macos too * fix ci * fix windows build --------- Signed-off-by: ShigrafS Co-authored-by: Lucas Nogueira --- .changes/CHANGES.md | 6 ++ crates/tauri-bundler/src/bundle.rs | 88 +++++++++++-------- crates/tauri-bundler/src/bundle/macos/app.rs | 6 +- .../tauri-bundler/src/bundle/macos/dmg/mod.rs | 2 +- crates/tauri-bundler/src/bundle/settings.rs | 27 ++++++ .../src/bundle/windows/msi/mod.rs | 12 +-- .../src/bundle/windows/nsis/mod.rs | 12 +-- .../tauri-bundler/src/bundle/windows/sign.rs | 13 +-- crates/tauri-cli/src/build.rs | 7 ++ crates/tauri-cli/src/bundle.rs | 10 +++ crates/tauri-cli/src/mobile/android/build.rs | 1 + crates/tauri-cli/src/mobile/ios/build.rs | 1 + 12 files changed, 128 insertions(+), 57 deletions(-) create mode 100644 .changes/CHANGES.md diff --git a/.changes/CHANGES.md b/.changes/CHANGES.md new file mode 100644 index 000000000..132f1aa2e --- /dev/null +++ b/.changes/CHANGES.md @@ -0,0 +1,6 @@ +--- +'tauri-cli': 'minor:feat' +'tauri-bundler': 'minor:feat' +--- + +Add a `--no-sign` flag to the `tauri build` and `tauri bundle` commands to skip the code signing step, improving the developer experience for local testing and development without requiring code signing keys. diff --git a/crates/tauri-bundler/src/bundle.rs b/crates/tauri-bundler/src/bundle.rs index 3ee307eef..113b591ff 100644 --- a/crates/tauri-bundler/src/bundle.rs +++ b/crates/tauri-bundler/src/bundle.rs @@ -85,41 +85,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { } // Sign windows binaries before the bundling step in case neither wix and nsis bundles are enabled - if matches!(target_os, TargetPlatform::Windows) { - if settings.can_sign() { - for bin in settings.binaries() { - if bin.main() { - // we will sign the main binary after patching per "package type" - continue; - } - let bin_path = settings.binary_path(bin); - windows::sign::try_sign(&bin_path, settings)?; - } - - // Sign the sidecar binaries - for bin in settings.external_binaries() { - let path = bin?; - let skip = std::env::var("TAURI_SKIP_SIDECAR_SIGNATURE_CHECK").is_ok_and(|v| v == "true"); - if skip { - continue; - } - - #[cfg(windows)] - if windows::sign::verify(&path)? { - log::info!( - "sidecar at \"{}\" already signed. Skipping...", - path.display() - ); - continue; - } - - windows::sign::try_sign(&path, settings)?; - } - } else { - #[cfg(not(target_os = "windows"))] - log::warn!("Signing, by default, is only supported on Windows hosts, but you can specify a custom signing command in `bundler > windows > sign_command`, for now, skipping signing the installer..."); - } - } + sign_binaries_if_needed(settings, target_os)?; let main_binary = settings .binaries() @@ -134,8 +100,9 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { // - codesigning tools should handle calculating+updating this, we just need to ensure // (re)signing is performed after every `patch_binary()` operation // - signing an already-signed binary can result in multiple signatures, causing verification errors - let main_binary_reset_required = - matches!(target_os, TargetPlatform::Windows) && settings.can_sign() && package_types.len() > 1; + let main_binary_reset_required = matches!(target_os, TargetPlatform::Windows) + && settings.windows().can_sign() + && package_types.len() > 1; let mut unsigned_main_binary_copy = tempfile::tempfile()?; if main_binary_reset_required { let mut unsigned_main_binary = std::fs::File::open(&main_binary_path)?; @@ -155,7 +122,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { } // sign main binary for every package type after patch - if matches!(target_os, TargetPlatform::Windows) && settings.can_sign() { + if matches!(target_os, TargetPlatform::Windows) && settings.windows().can_sign() { if main_binary_signed && main_binary_reset_required { let mut signed_main_binary = std::fs::OpenOptions::new() .write(true) @@ -305,6 +272,51 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { Ok(bundles) } +fn sign_binaries_if_needed(settings: &Settings, target_os: &TargetPlatform) -> crate::Result<()> { + if matches!(target_os, TargetPlatform::Windows) { + if settings.windows().can_sign() { + if settings.no_sign() { + log::info!("Skipping binary signing due to --no-sign flag."); + return Ok(()); + } + + for bin in settings.binaries() { + if bin.main() { + // we will sign the main binary after patching per "package type" + continue; + } + let bin_path = settings.binary_path(bin); + windows::sign::try_sign(&bin_path, settings)?; + } + + // Sign the sidecar binaries + for bin in settings.external_binaries() { + let path = bin?; + let skip = std::env::var("TAURI_SKIP_SIDECAR_SIGNATURE_CHECK").is_ok_and(|v| v == "true"); + if skip { + continue; + } + + #[cfg(windows)] + if windows::sign::verify(&path)? { + log::info!( + "sidecar at \"{}\" already signed. Skipping...", + path.display() + ); + continue; + } + + windows::sign::try_sign(&path, settings)?; + } + } else { + #[cfg(not(target_os = "windows"))] + log::warn!("Signing, by default, is only supported on Windows hosts, but you can specify a custom signing command in `bundler > windows > sign_command`, for now, skipping signing the installer..."); + } + } + + Ok(()) +} + /// Check to see if there are icons in the settings struct pub fn check_icons(settings: &Settings) -> crate::Result { // make a peekable iterator of the icon_files diff --git a/crates/tauri-bundler/src/bundle/macos/app.rs b/crates/tauri-bundler/src/bundle/macos/app.rs index b5ef1f816..a6881ee10 100644 --- a/crates/tauri-bundler/src/bundle/macos/app.rs +++ b/crates/tauri-bundler/src/bundle/macos/app.rs @@ -103,7 +103,11 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { copy_custom_files_to_bundle(&bundle_directory, settings)?; - if let Some(keychain) = super::sign::keychain(settings.macos().signing_identity.as_deref())? { + if settings.no_sign() { + log::warn!("Skipping signing due to --no-sign flag.",); + } else if let Some(keychain) = + super::sign::keychain(settings.macos().signing_identity.as_deref())? + { // Sign frameworks and sidecar binaries first, per apple, signing must be done inside out // https://developer.apple.com/forums/thread/701514 sign_paths.push(SignTarget { diff --git a/crates/tauri-bundler/src/bundle/macos/dmg/mod.rs b/crates/tauri-bundler/src/bundle/macos/dmg/mod.rs index bbc59e505..eda756329 100644 --- a/crates/tauri-bundler/src/bundle/macos/dmg/mod.rs +++ b/crates/tauri-bundler/src/bundle/macos/dmg/mod.rs @@ -195,7 +195,7 @@ pub fn bundle_project(settings: &Settings, bundles: &[Bundle]) -> crate::Result< // Sign DMG if needed // skipping self-signing DMGs https://github.com/tauri-apps/tauri/issues/12288 let identity = settings.macos().signing_identity.as_deref(); - if identity != Some("-") { + if !settings.no_sign() && identity != Some("-") { if let Some(keychain) = super::sign::keychain(identity)? { super::sign::sign( &keychain, diff --git a/crates/tauri-bundler/src/bundle/settings.rs b/crates/tauri-bundler/src/bundle/settings.rs index 85642e2e6..8703b5bb3 100644 --- a/crates/tauri-bundler/src/bundle/settings.rs +++ b/crates/tauri-bundler/src/bundle/settings.rs @@ -572,6 +572,12 @@ pub struct WindowsSettings { pub sign_command: Option, } +impl WindowsSettings { + pub(crate) fn can_sign(&self) -> bool { + self.sign_command.is_some() || self.certificate_thumbprint.is_some() + } +} + #[allow(deprecated)] mod _default { use super::*; @@ -778,6 +784,8 @@ pub struct Settings { target_platform: TargetPlatform, /// The target triple. target: String, + /// Whether to disable code signing during the bundling process. + no_sign: bool, } /// A builder for [`Settings`]. @@ -791,6 +799,7 @@ pub struct SettingsBuilder { binaries: Vec, target: Option, local_tools_directory: Option, + no_sign: bool, } impl SettingsBuilder { @@ -860,6 +869,13 @@ impl SettingsBuilder { self } + /// Sets whether to skip code signing. + #[must_use] + pub fn no_sign(mut self, no_sign: bool) -> Self { + self.no_sign = no_sign; + self + } + /// Builds a Settings from the CLI args. /// /// Package settings will be read from Cargo.toml. @@ -894,6 +910,7 @@ impl SettingsBuilder { }, target_platform, target, + no_sign: self.no_sign, }) } } @@ -1242,4 +1259,14 @@ impl Settings { pub fn updater(&self) -> Option<&UpdaterSettings> { self.bundle_settings.updater.as_ref() } + + /// Whether to skip signing. + pub fn no_sign(&self) -> bool { + self.no_sign + } + + /// Set whether to skip signing. + pub fn set_no_sign(&mut self, no_sign: bool) { + self.no_sign = no_sign; + } } diff --git a/crates/tauri-bundler/src/bundle/windows/msi/mod.rs b/crates/tauri-bundler/src/bundle/windows/msi/mod.rs index 9e59da3f4..84ed46c33 100644 --- a/crates/tauri-bundler/src/bundle/windows/msi/mod.rs +++ b/crates/tauri-bundler/src/bundle/windows/msi/mod.rs @@ -470,7 +470,7 @@ pub fn build_wix_app_installer( fs::create_dir_all(&output_path)?; // when we're performing code signing, we'll sign some WiX DLLs, so we make a local copy - let wix_toolset_path = if settings.can_sign() { + let wix_toolset_path = if settings.windows().can_sign() { let wix_path = output_path.join("wix"); crate::utils::fs_utils::copy_dir(wix_toolset_path, &wix_path) .context("failed to copy wix directory")?; @@ -771,7 +771,7 @@ pub fn build_wix_app_installer( let mut extensions = Vec::new(); for cap in extension_regex.captures_iter(&fragment) { let path = wix_toolset_path.join(format!("Wix{}.dll", &cap[1])); - if settings.can_sign() { + if settings.windows().can_sign() { try_sign(&path, settings)?; } extensions.push(path); @@ -785,7 +785,7 @@ pub fn build_wix_app_installer( fragment_extensions.insert(wix_toolset_path.join("WixUtilExtension.dll")); // sign default extensions - if settings.can_sign() { + if settings.windows().can_sign() { for path in &fragment_extensions { try_sign(path, settings)?; } @@ -879,7 +879,7 @@ pub fn build_wix_app_installer( )?; fs::rename(&msi_output_path, &msi_path)?; - if settings.can_sign() { + if settings.windows().can_sign() { try_sign(&msi_path, settings)?; } @@ -988,7 +988,7 @@ fn generate_resource_data(settings: &Settings) -> crate::Result { } added_resources.push(resource_path.clone()); - if settings.can_sign() && should_sign(&resource_path)? { + if settings.windows().can_sign() && should_sign(&resource_path)? { try_sign(&resource_path, settings)?; } @@ -1076,7 +1076,7 @@ fn generate_resource_data(settings: &Settings) -> crate::Result { .to_string_lossy() .into_owned(); if !added_resources.iter().any(|r| r.ends_with(&relative_path)) { - if settings.can_sign() { + if settings.windows().can_sign() { try_sign(resource_path, settings)?; } diff --git a/crates/tauri-bundler/src/bundle/windows/nsis/mod.rs b/crates/tauri-bundler/src/bundle/windows/nsis/mod.rs index 3469f2b3a..edd4acbe1 100644 --- a/crates/tauri-bundler/src/bundle/windows/nsis/mod.rs +++ b/crates/tauri-bundler/src/bundle/windows/nsis/mod.rs @@ -192,7 +192,7 @@ fn build_nsis_app_installer( // we make a copy of the NSIS directory if we're going to sign its DLLs // because we don't want to change the DLL hashes so the cache can reuse it - let maybe_plugin_copy_path = if settings.can_sign() { + let maybe_plugin_copy_path = if settings.windows().can_sign() { // find nsis path #[cfg(target_os = "linux")] let system_nsis_toolset_path = std::env::var_os("NSIS_PATH") @@ -283,7 +283,7 @@ fn build_nsis_app_installer( ); data.insert("copyright", to_json(settings.copyright_string())); - if settings.can_sign() { + if settings.windows().can_sign() { let sign_cmd = format!("{:?}", sign_command("%1", &settings.sign_params())?); data.insert("uninstaller_sign_cmd", to_json(sign_cmd)); } @@ -600,7 +600,7 @@ fn build_nsis_app_installer( )); fs::create_dir_all(nsis_installer_path.parent().unwrap())?; - if settings.can_sign() { + if settings.windows().can_sign() { log::info!("Signing NSIS plugins"); for dll in NSIS_PLUGIN_FILES { let path = additional_plugins_path.join(dll); @@ -640,7 +640,7 @@ fn build_nsis_app_installer( fs::rename(nsis_output_path, &nsis_installer_path)?; - if settings.can_sign() { + if settings.windows().can_sign() { try_sign(&nsis_installer_path, settings)?; } else { #[cfg(not(target_os = "windows"))] @@ -718,7 +718,7 @@ fn generate_resource_data(settings: &Settings) -> crate::Result { let loader_path = dunce::simplified(&settings.project_out_directory().join("WebView2Loader.dll")).to_path_buf(); if loader_path.exists() { - if settings.can_sign() { + if settings.windows().can_sign() { try_sign(&loader_path, settings)?; } added_resources.push(loader_path.clone()); @@ -743,7 +743,7 @@ fn generate_resource_data(settings: &Settings) -> crate::Result { } added_resources.push(resource_path.clone()); - if settings.can_sign() && should_sign(&resource_path)? { + if settings.windows().can_sign() && should_sign(&resource_path)? { try_sign(&resource_path, settings)?; } diff --git a/crates/tauri-bundler/src/bundle/windows/sign.rs b/crates/tauri-bundler/src/bundle/windows/sign.rs index 40ddfc69c..04e5a2da5 100644 --- a/crates/tauri-bundler/src/bundle/windows/sign.rs +++ b/crates/tauri-bundler/src/bundle/windows/sign.rs @@ -14,10 +14,6 @@ use std::sync::OnceLock; use std::{path::Path, process::Command}; impl Settings { - pub(crate) fn can_sign(&self) -> bool { - self.windows().sign_command.is_some() || self.windows().certificate_thumbprint.is_some() - } - pub(crate) fn sign_params(&self) -> SignParams { SignParams { product_name: self.product_name().into(), @@ -251,7 +247,14 @@ pub fn sign>(path: P, params: &SignParams) -> crate::Result<()> { } pub fn try_sign>(file_path: P, settings: &Settings) -> crate::Result<()> { - if settings.can_sign() { + if settings.no_sign() { + log::warn!( + "Skipping signing for {} due to --no-sign flag.", + tauri_utils::display_path(file_path.as_ref()) + ); + return Ok(()); + } + if settings.windows().can_sign() { log::info!(action = "Signing"; "{}", tauri_utils::display_path(file_path.as_ref())); sign(file_path, &settings.sign_params())?; } diff --git a/crates/tauri-cli/src/build.rs b/crates/tauri-cli/src/build.rs index 12138efcc..288518d87 100644 --- a/crates/tauri-cli/src/build.rs +++ b/crates/tauri-cli/src/build.rs @@ -76,11 +76,18 @@ pub struct Options { /// Only use this when you are sure the mismatch is incorrectly detected as version mismatched Tauri packages can lead to unknown behavior. #[clap(long)] pub ignore_version_mismatches: bool, + /// Skip code signing when bundling the app + #[clap(long)] + pub no_sign: bool, } pub fn command(mut options: Options, verbosity: u8) -> Result<()> { crate::helpers::app_paths::resolve(); + if options.no_sign { + log::warn!("--no-sign flag detected: Signing will be skipped."); + } + let ci = options.ci; let target = options diff --git a/crates/tauri-cli/src/bundle.rs b/crates/tauri-cli/src/bundle.rs index 09bb38777..23999082f 100644 --- a/crates/tauri-cli/src/bundle.rs +++ b/crates/tauri-cli/src/bundle.rs @@ -92,6 +92,14 @@ pub struct Options { /// On subsequent runs, it's recommended to disable this setting again. #[clap(long)] pub skip_stapling: bool, + + /// Skip code signing during the build or bundling process. + /// + /// Useful for local development and CI environments + /// where signing certificates or environment variables + /// are not available or not needed. + #[clap(long)] + pub no_sign: bool, } impl From for Options { @@ -104,6 +112,7 @@ impl From for Options { ci: value.ci, config: value.config, skip_stapling: value.skip_stapling, + no_sign: value.no_sign, } } } @@ -197,6 +206,7 @@ pub fn bundle( let mut settings = app_settings .get_bundler_settings(options.clone().into(), config, out_dir, package_types) .with_context(|| "failed to build bundler settings")?; + settings.set_no_sign(options.no_sign); settings.set_log_level(match verbosity { 0 => log::Level::Error, diff --git a/crates/tauri-cli/src/mobile/android/build.rs b/crates/tauri-cli/src/mobile/android/build.rs index e042979b9..94f5b3896 100644 --- a/crates/tauri-cli/src/mobile/android/build.rs +++ b/crates/tauri-cli/src/mobile/android/build.rs @@ -99,6 +99,7 @@ impl From for BuildOptions { ci: options.ci, skip_stapling: false, ignore_version_mismatches: options.ignore_version_mismatches, + no_sign: false, } } } diff --git a/crates/tauri-cli/src/mobile/ios/build.rs b/crates/tauri-cli/src/mobile/ios/build.rs index 4f0de4f37..27f06a608 100644 --- a/crates/tauri-cli/src/mobile/ios/build.rs +++ b/crates/tauri-cli/src/mobile/ios/build.rs @@ -150,6 +150,7 @@ impl From for BuildOptions { ci: options.ci, skip_stapling: false, ignore_version_mismatches: options.ignore_version_mismatches, + no_sign: false, } } }