Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support patch based on target #15153

Open
ahqsoftwares opened this issue Feb 7, 2025 · 0 comments
Open

Support patch based on target #15153

ahqsoftwares opened this issue Feb 7, 2025 · 0 comments
Labels
A-patch Area: [patch] table override A-target-dependencies Area: [target.'cfg(foo)'.dependencies] C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.

Comments

@ahqsoftwares
Copy link

ahqsoftwares commented Feb 7, 2025

Problem

For example, in the below manifest

[package]
name = "ahqstore-new"
version = "0.1.0"
description = "The Open Sourced App Store"
authors = ["AHQ Softwares"]
edition = "2021"

[lib]
name = "ahqstore_new_lib"
crate-type = ["staticlib", "cdylib", "rlib"]

[build-dependencies]
tauri-build = { version = "2", features = [] }

[dependencies]
tauri = { version = "2", features = ["tray-icon", "image-png"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"

tauri-plugin-ahqstore = { path = "../src-plugin" }
tauri-plugin-deep-link = "2"
tauri-plugin-os = "2"

[target.'cfg(windows)'.dependencies]
windows = { version = "=0.59", features = ["Win32_Graphics_Dwm"] }

[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-autostart = "2"
tauri-plugin-single-instance = "2"
tauri-plugin-updater = "2"

[target.'cfg(mobile)'.patch.crates-io]
wry = { git = "https://github.com/ahqsoftwares/wry.git", branch = "patch-2" }

If the wry patch is used on any target except mobile, it won't compile due to different dependencies

Proposed Solution

Support target.*.patch.*

Notes

No response

@ahqsoftwares ahqsoftwares added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Feb 7, 2025
@epage epage added A-patch Area: [patch] table override A-target-dependencies Area: [target.'cfg(foo)'.dependencies] labels Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-patch Area: [patch] table override A-target-dependencies Area: [target.'cfg(foo)'.dependencies] C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

2 participants