Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ ignore = [
"RUSTSEC-2020-0095",
# proc-macro-error is unmaintained
"RUSTSEC-2024-0370",
# time crate can't be updated in the repo because of MSRV, users are unaffected
"RUSTSEC-2026-0009",
# rand unsoundness, fixed when we remove kuchikiki from deps in v3, currently
# remains for semver reasons but is not built in default configuration
"RUSTSEC-2026-0097",
Expand Down
16 changes: 16 additions & 0 deletions .changes/msrv-1.90.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"tauri": minor:changes
"tauri-utils": minor:changes
"tauri-runtime": minor:changes
"tauri-runtime-wry": minor:changes
"tauri-codegen": minor:changes
"tauri-macros": minor:changes
"tauri-plugin": minor:changes
"tauri-build": minor:changes
"tauri-cli": minor:changes
"tauri-macos-sign": minor:changes
"tauri-bundler": minor:changes
"tauri-driver": minor:changes
---

Set MSRV to 1.90.
4 changes: 2 additions & 2 deletions .github/workflows/test-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: install Rust 1.77.2
uses: dtolnay/rust-toolchain@1.77.2
- name: install Rust 1.90
uses: dtolnay/rust-toolchain@1.90

- name: install Linux dependencies
if: matrix.platform == 'ubuntu-latest'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-cli-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- uses: actions/checkout@v4

- name: 'Setup Rust'
uses: dtolnay/rust-toolchain@1.77.2
uses: dtolnay/rust-toolchain@1.90
with:
targets: ${{ matrix.platform.target }}

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,35 +39,35 @@ jobs:
- {
target: x86_64-pc-windows-msvc,
os: windows-latest,
toolchain: '1.77.2',
toolchain: '1.90',
cross: false,
command: 'test'
}
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-latest,
toolchain: '1.77.2',
toolchain: '1.90',
cross: false,
command: 'test'
}
- {
target: aarch64-apple-darwin,
os: macos-14,
toolchain: '1.77.2',
toolchain: '1.90',
cross: false,
command: 'test'
}
- {
target: aarch64-apple-ios,
os: macos-latest,
toolchain: '1.77.2',
toolchain: '1.90',
cross: false,
command: 'build'
}
- {
target: aarch64-linux-android,
os: ubuntu-latest,
toolchain: '1.77.2',
toolchain: '1.90',
cross: true,
command: 'build'
}
Expand Down
30 changes: 14 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repository = "https://github.com/tauri-apps/tauri"
categories = ["gui", "web-programming"]
license = "Apache-2.0 OR MIT"
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.90"

# default to small, optimized workspace release binaries
[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "tauri_bench"
version = "0.1.0"
authors = ["Tauri Programme within The Commons Conservancy"]
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.90"
license = "Apache-2.0 OR MIT"
description = "Cross-platform WebView rendering library"
repository = "https://github.com/tauri-apps/wry"
Expand Down
2 changes: 1 addition & 1 deletion bench/tests/cpu_intensive/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "bench_cpu_intensive"
version = "0.1.0"
description = "A very simple Tauri Application"
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.90"

[build-dependencies]
tauri-build = { path = "../../../../crates/tauri-build", features = [
Expand Down
2 changes: 1 addition & 1 deletion bench/tests/files_transfer/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "bench_files_transfer"
version = "0.1.0"
description = "A very simple Tauri Application"
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.90"

[build-dependencies]
tauri-build = { path = "../../../../crates/tauri-build", features = [
Expand Down
2 changes: 1 addition & 1 deletion bench/tests/helloworld/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "bench_helloworld"
version = "0.1.0"
description = "A very simple Tauri Application"
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.90"

[build-dependencies]
tauri-build = { path = "../../../../crates/tauri-build", features = [
Expand Down
2 changes: 1 addition & 1 deletion crates/tauri-bundler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords = ["bundle", "cargo", "tauri"]
repository = "https://github.com/tauri-apps/tauri"
description = "Wrap rust executables in OS-specific app bundles for Tauri"
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.90"
exclude = ["CHANGELOG.md", "/target", "rustfmt.toml"]

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions crates/tauri-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "tauri-cli"
version = "2.11.3"
authors = ["Tauri Programme within The Commons Conservancy"]
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.90"
categories = ["gui", "web-programming"]
license = "Apache-2.0 OR MIT"
homepage = "https://tauri.app"
Expand Down Expand Up @@ -98,7 +98,7 @@ css-color = "0.2"
resvg = "0.45.0"
dunce = "1"
glob = "0.3"
# 0.39 raised msrv to above 1.78 but 0.37+ can't compile on 1.77.2 either.
# 0.39 raised msrv to above 1.78 but 0.37+ can't compile on 1.90 either.
oxc_parser = "0.36"
oxc_span = "0.36"
oxc_allocator = "0.36"
Expand Down
18 changes: 7 additions & 11 deletions crates/tauri-cli/src/helpers/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::{
ffi::{OsStr, OsString},
path::Path,
process::exit,
sync::OnceLock,
sync::LazyLock,
};

use crate::error::Context;
Expand Down Expand Up @@ -141,15 +141,11 @@ pub fn custom_sign_settings(
}
}

fn config_schema_validator() -> &'static jsonschema::Validator {
// TODO: Switch to `LazyLock` when we bump MSRV to above 1.80
static CONFIG_SCHEMA_VALIDATOR: OnceLock<jsonschema::Validator> = OnceLock::new();
CONFIG_SCHEMA_VALIDATOR.get_or_init(|| {
let schema: JsonValue = serde_json::from_str(include_str!("../../config.schema.json"))
.expect("Failed to parse config schema bundled in the tauri-cli");
jsonschema::validator_for(&schema).expect("Config schema bundled in the tauri-cli is invalid")
})
}
static CONFIG_SCHEMA_VALIDATOR: LazyLock<jsonschema::Validator> = LazyLock::new(|| {
let schema: JsonValue = serde_json::from_str(include_str!("../../config.schema.json"))
.expect("Failed to parse config schema bundled in the tauri-cli");
jsonschema::validator_for(&schema).expect("Config schema bundled in the tauri-cli is invalid")
});

fn load_config(
merge_configs: &[&serde_json::Value],
Expand Down Expand Up @@ -191,7 +187,7 @@ fn load_config(
if config_path.extension() == Some(OsStr::new("json"))
|| config_path.extension() == Some(OsStr::new("json5"))
{
let mut errors = config_schema_validator().iter_errors(&config).peekable();
let mut errors = CONFIG_SCHEMA_VALIDATOR.iter_errors(&config).peekable();
if errors.peek().is_some() {
for error in errors {
let path = error.instance_path.into_iter().join(" > ");
Expand Down
2 changes: 1 addition & 1 deletion crates/tauri-cli/src/helpers/updater_signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ where
{
let bin_path = bin_path.as_ref();
// We need to append .sig at the end it's where the signature will be stored
// TODO: use with_added_extension when we bump MSRV to > 1.91'
// TODO: use `with_added_extension` when we bump MSRV to >= 1.91
let signature_path = if let Some(ext) = bin_path.extension() {
let mut extension = ext.to_os_string();
extension.push(".sig");
Expand Down
8 changes: 3 additions & 5 deletions crates/tauri-cli/src/icon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use crate::{
};

use std::{
borrow::Cow,
collections::HashMap,
fs::{create_dir_all, File},
io::{BufWriter, Write},
Expand Down Expand Up @@ -895,10 +894,9 @@ fn content_bounds(img: &DynamicImage) -> Option<(u32, u32, u32, u32)> {

fn resize_asset(img: &DynamicImage, target_size: u32, scale_percent: f32) -> DynamicImage {
let cropped = if let Some((x, y, cw, ch)) = content_bounds(img) {
// TODO: Use `&` here instead when we raise MSRV to above 1.79
Cow::Owned(img.crop_imm(x, y, cw, ch))
&img.crop_imm(x, y, cw, ch)
} else {
Cow::Borrowed(img)
img
};

let (cw, ch) = cropped.dimensions();
Expand All @@ -908,7 +906,7 @@ fn resize_asset(img: &DynamicImage, target_size: u32, scale_percent: f32) -> Dyn
let new_w = (cw as f32 * scale).round() as u32;
let new_h = (ch as f32 * scale).round() as u32;

let resized = resize_image(&cropped, new_w, new_h);
let resized = resize_image(cropped, new_w, new_h);

// Place on transparent square canvas
let mut canvas = ImageBuffer::from_pixel(target_size, target_size, Rgba([0, 0, 0, 0]));
Expand Down
2 changes: 1 addition & 1 deletion crates/tauri-cli/src/interface/rust/desktop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ pub fn build(
let out_dir = app_settings.out_dir(&options, tauri_dir)?;
let bin_path = app_settings.app_binary_path(&options, tauri_dir)?;

if !std::env::var_os("STATIC_VCRUNTIME").is_some_and(|v| v == "false") {
if std::env::var_os("STATIC_VCRUNTIME").is_none_or(|v| v != "false") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This transformation is correct but the code was probably wrong to begin with; if STATIC_VCRUNTIME == true it will overwrite it with true. Probably wants is_none_or(|v| v != "true")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it, we can do it in another PR that this PR would only contain refactors without behavior changes

std::env::set_var("STATIC_VCRUNTIME", "true");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["you"]
license = ""
repository = ""
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.90"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion crates/tauri-cli/templates/plugin/Cargo.crate-manifest
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = [ "{{ author }}" ]
description = ""
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.90"
exclude = ["/examples", "/dist-js", "/guest-js", "/node_modules"]
links = "tauri-plugin-{{ plugin_name }}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["you"]
license = ""
repository = ""
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.90"

[lib]
name = "tauri_app_lib"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["you"]
license = ""
repository = ""
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.90"

[lib]
name = "tauri_app_lib"
Expand Down
2 changes: 1 addition & 1 deletion crates/tauri-driver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository = "https://github.com/tauri-apps/tauri"
description = "Webdriver server for Tauri applications"
readme = "README.md"
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.90"

[dependencies]
anyhow = "1"
Expand Down
2 changes: 1 addition & 1 deletion crates/tauri-macos-sign/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords = ["codesign", "signing", "macos", "ios", "tauri"]
repository = "https://github.com/tauri-apps/tauri"
description = "Code signing utilities for macOS and iOS apps"
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.90"

[dependencies]
thiserror = "2"
Expand Down
Loading
Loading