mirror of
https://github.com/rust-mobile/android-activity.git
synced 2026-07-13 18:18:56 +00:00
b7f01a43d9
The latest branches for Winit (which update the Android backend to use android-activity) now depend on the android-activity 0.2 release which broke the patching assumption for the Winit examples. (they were patching based on the git url not crates.io) It was also noticed that the latest android-activity-0.27 branch isn't compatible with Egui currently because the (badly named) branch is based on Winit master and there was recently a breaking API change adding new window events which breaks Egui. A note about the badly name branches has been added to the Cargo.toml files for the Winit examples (they can't currently be fixes since the -0.27 branch is part of a pull request). For reference here: - "android-activity" is based on Winit 0.27 (required for Egui compatibility) - "android-activity-0.27" is based on Winit master This patch adds Cargo.lock files for the Winit examples. Fixes: #22
53 lines
1.6 KiB
TOML
53 lines
1.6 KiB
TOML
[package]
|
|
name = "agdk-winit-wgpu"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[dependencies]
|
|
log = "0.4"
|
|
winit = "0.27"
|
|
wgpu = "0.13.0"
|
|
pollster = "0.2"
|
|
|
|
[target.'cfg(not(target_os = "android"))'.dependencies]
|
|
env_logger = "0.9"
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
android_logger = "0.11.0"
|
|
android-activity = { version = "0.2", features = [ "game-activity" ] }
|
|
|
|
[patch.crates-io]
|
|
|
|
# This branch of Winit has an updated Android backend based on android-activity
|
|
# Note: The winit branches are current misnamed:
|
|
# - "android-activity" is based on Winit 0.27 (required for Egui compatibility)
|
|
# - "android-activity-0.27" is based on Winit master
|
|
# The -0.27 branch is currently associated with a pull request so we'll just
|
|
# stick with these names for now
|
|
winit = { git = "https://github.com/rib/winit", branch = "android-activity-0.27" }
|
|
#winit = { path = "../../../winit" }
|
|
|
|
# Note:
|
|
# Since android-activity is responsible for invoking the `android_main`
|
|
# entrypoint for a native Rust application there can only be a single
|
|
# implementation of the crate linked with the application.
|
|
#
|
|
# Since Winit also depends on android-activity (version = "0.2") but we'd like
|
|
# to build against the local version of android-activity in this repo then we
|
|
# use a [patch] to ensure we only end up with a single implementation.
|
|
android-activity = { path="../../android-activity" }
|
|
|
|
[features]
|
|
default = []
|
|
desktop = []
|
|
|
|
[lib]
|
|
name="main"
|
|
crate_type=["cdylib"]
|
|
|
|
[[bin]]
|
|
path="src/lib.rs"
|
|
name="test-winit-wgpu"
|
|
required-features = [ "desktop" ] |