Skip to content

Support patch based on target #15153

Open
@ahqsoftwares

Description

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

Metadata

Assignees

No one assigned

    Labels

    A-patchArea: [patch] table overrideA-target-dependenciesArea: [target.'cfg(foo)'.dependencies]C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions