From 87e9807cdd43983ba6ee57762aff280a85be46ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 6 Mar 2024 11:31:13 +0100 Subject: [PATCH 1/4] fix syntax --- examples/mobile/.cargo/config.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/mobile/.cargo/config.toml b/examples/mobile/.cargo/config.toml index 27767cc6e1561..99505ecea3757 100644 --- a/examples/mobile/.cargo/config.toml +++ b/examples/mobile/.cargo/config.toml @@ -1,5 +1,5 @@ # Flag to notify the compiler we're building for the iOS simulator from an Apple silicon mac # This needs some workarounds for now # See https://github.com/bevyengine/bevy/pull/10178 - remove if it's not needed anymore. -[target.aarch64-apple-ios-sim] -features = ["bevy_render/ios_simulator"] +[target.aarch64-apple-ios-sim.features] +["ios_simulator"] From 04c365ec6f0470b66e50d0df6701fc76ddca7687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 6 Mar 2024 13:08:48 +0100 Subject: [PATCH 2/4] fix ios_simulator feature --- Cargo.toml | 3 +++ crates/bevy_internal/Cargo.toml | 3 +++ examples/mobile/Cargo.toml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 216db0ff923b6..ddaa50e6b3e33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -318,6 +318,9 @@ embedded_watcher = ["bevy_internal/embedded_watcher"] # Enable stepping-based debugging of Bevy systems bevy_debug_stepping = ["bevy_internal/bevy_debug_stepping"] +# Enable support for the ios_simulator by downgrading some rendering capabilities +ios_simulator = ["bevy_internal/ios_simulator"] + [dependencies] bevy_dylib = { path = "crates/bevy_dylib", version = "0.14.0-dev", default-features = false, optional = true } bevy_internal = { path = "crates/bevy_internal", version = "0.14.0-dev", default-features = false } diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index 9396eca5d4e20..da98324894453 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -163,6 +163,9 @@ bevy_debug_stepping = [ "bevy_app/bevy_debug_stepping", ] +# Enable support for the ios_simulator by downgrading some rendering capabilities +ios_simulator = ["bevy_pbr?/ios_simulator", "bevy_render?/ios_simulator"] + [dependencies] # bevy bevy_a11y = { path = "../bevy_a11y", version = "0.14.0-dev" } diff --git a/examples/mobile/Cargo.toml b/examples/mobile/Cargo.toml index 194970d0728c9..e1e768a2fcc75 100644 --- a/examples/mobile/Cargo.toml +++ b/examples/mobile/Cargo.toml @@ -13,6 +13,9 @@ crate-type = ["staticlib", "cdylib"] [dependencies] bevy = { path = "../../" } +[target.aarch64-apple-ios-sim.dependencies] +bevy = { path = "../../", features = ["ios_simulator"] } + [package.metadata.android] package = "org.bevyengine.example" apk_name = "bevyexample" From 49490b8ad70a9b6a318856ed53fb7ca2246ad571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 6 Mar 2024 13:10:42 +0100 Subject: [PATCH 3/4] update feature page --- docs/cargo_features.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/cargo_features.md b/docs/cargo_features.md index fa3f20d0ad191..e82d98adf8a77 100644 --- a/docs/cargo_features.md +++ b/docs/cargo_features.md @@ -61,6 +61,7 @@ The default feature set enables most of the expected features of a game engine, |file_watcher|Enables watching the filesystem for Bevy Asset hot-reloading| |flac|FLAC audio format support| |glam_assert|Enable assertions to check the validity of parameters passed to glam| +|ios_simulator|Enable support for the ios_simulator by downgrading some rendering capabilities| |jpeg|JPEG image format support| |minimp3|MP3 audio format support (through minimp3)| |mp3|MP3 audio format support| From 73316eea4a07ed0c8b85b55e7ddc273412e69485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 6 Mar 2024 16:28:33 +0100 Subject: [PATCH 4/4] remove cargo config as its handle through normal feature now --- examples/mobile/.cargo/config.toml | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 examples/mobile/.cargo/config.toml diff --git a/examples/mobile/.cargo/config.toml b/examples/mobile/.cargo/config.toml deleted file mode 100644 index 99505ecea3757..0000000000000 --- a/examples/mobile/.cargo/config.toml +++ /dev/null @@ -1,5 +0,0 @@ -# Flag to notify the compiler we're building for the iOS simulator from an Apple silicon mac -# This needs some workarounds for now -# See https://github.com/bevyengine/bevy/pull/10178 - remove if it's not needed anymore. -[target.aarch64-apple-ios-sim.features] -["ios_simulator"]