From 3498b5a62eff2e743e1edd91d8396b9968530ce9 Mon Sep 17 00:00:00 2001 From: harudagondi Date: Fri, 2 Sep 2022 12:41:22 +0800 Subject: [PATCH 1/3] Expose mint feature in bevy_math/glam --- Cargo.toml | 3 +++ crates/bevy_internal/Cargo.toml | 3 +++ crates/bevy_math/Cargo.toml | 4 ++++ docs/cargo_features.md | 1 + 4 files changed, 11 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index b0920d9ecd0fa..ed1ba80679c8c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -115,6 +115,9 @@ debug_asset_server = ["bevy_internal/debug_asset_server"] # Enable animation support, and glTF animation loading animation = ["bevy_internal/animation"] +# Enable interoperation of glam types with mint-compatible libraries +mint = ["bevy_internal/mint"] + [dependencies] bevy_dylib = { path = "crates/bevy_dylib", version = "0.9.0-dev", default-features = false, optional = true } bevy_internal = { path = "crates/bevy_internal", version = "0.9.0-dev", default-features = false } diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index d4be55fc72878..e13b0c65339a9 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -63,6 +63,9 @@ bevy_ci_testing = ["bevy_app/bevy_ci_testing", "bevy_render/ci_limits"] # Enable animation support, and glTF animation loading animation = ["bevy_animation", "bevy_gltf?/bevy_animation"] +# Enable interoperation of glam types with mint-compatible libraries +mint = ["bevy_math/mint"] + [dependencies] # bevy bevy_app = { path = "../bevy_app", version = "0.9.0-dev" } diff --git a/crates/bevy_math/Cargo.toml b/crates/bevy_math/Cargo.toml index be5c06db0ac93..a87fefa2d5da1 100644 --- a/crates/bevy_math/Cargo.toml +++ b/crates/bevy_math/Cargo.toml @@ -10,3 +10,7 @@ keywords = ["bevy"] [dependencies] glam = { version = "0.21", features = ["serde", "bytemuck"] } + +[features] +# Enable interoperation of glam types with mint-compatible libraries +mint = ["glam/mint"] \ No newline at end of file diff --git a/docs/cargo_features.md b/docs/cargo_features.md index 8d0db4604380e..fc442266a202d 100644 --- a/docs/cargo_features.md +++ b/docs/cargo_features.md @@ -44,3 +44,4 @@ |subpixel_glyph_atlas|Enable this to cache glyphs using subpixel accuracy. This increases texture memory usage as each position requires a separate sprite in the glyph atlas, but provide more accurate character spacing.| |bevy_ci_testing|Used for running examples in CI.| |debug_asset_server|Enabling this turns on "hot reloading" of built in assets, such as shaders.| +|mint|Enable interoperation of `glam` types with `mint`-compatible libraries.| From 42f73d1ab3277683dd1fa70cdaef543c84a725e9 Mon Sep 17 00:00:00 2001 From: harudagondi Date: Fri, 2 Sep 2022 15:19:26 +0800 Subject: [PATCH 2/3] Remove feature from bevy and bevy_internal --- Cargo.toml | 3 --- crates/bevy_internal/Cargo.toml | 3 --- docs/cargo_features.md | 1 - 3 files changed, 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ed1ba80679c8c..b0920d9ecd0fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -115,9 +115,6 @@ debug_asset_server = ["bevy_internal/debug_asset_server"] # Enable animation support, and glTF animation loading animation = ["bevy_internal/animation"] -# Enable interoperation of glam types with mint-compatible libraries -mint = ["bevy_internal/mint"] - [dependencies] bevy_dylib = { path = "crates/bevy_dylib", version = "0.9.0-dev", default-features = false, optional = true } bevy_internal = { path = "crates/bevy_internal", version = "0.9.0-dev", default-features = false } diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index e13b0c65339a9..d4be55fc72878 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -63,9 +63,6 @@ bevy_ci_testing = ["bevy_app/bevy_ci_testing", "bevy_render/ci_limits"] # Enable animation support, and glTF animation loading animation = ["bevy_animation", "bevy_gltf?/bevy_animation"] -# Enable interoperation of glam types with mint-compatible libraries -mint = ["bevy_math/mint"] - [dependencies] # bevy bevy_app = { path = "../bevy_app", version = "0.9.0-dev" } diff --git a/docs/cargo_features.md b/docs/cargo_features.md index fc442266a202d..8d0db4604380e 100644 --- a/docs/cargo_features.md +++ b/docs/cargo_features.md @@ -44,4 +44,3 @@ |subpixel_glyph_atlas|Enable this to cache glyphs using subpixel accuracy. This increases texture memory usage as each position requires a separate sprite in the glyph atlas, but provide more accurate character spacing.| |bevy_ci_testing|Used for running examples in CI.| |debug_asset_server|Enabling this turns on "hot reloading" of built in assets, such as shaders.| -|mint|Enable interoperation of `glam` types with `mint`-compatible libraries.| From aa4f4122e18767602530e3095fcfc7405d208567 Mon Sep 17 00:00:00 2001 From: harudagondi Date: Sat, 3 Sep 2022 09:57:15 +0800 Subject: [PATCH 3/3] Add newline at end of file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François --- crates/bevy_math/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_math/Cargo.toml b/crates/bevy_math/Cargo.toml index a87fefa2d5da1..56a71c63820d5 100644 --- a/crates/bevy_math/Cargo.toml +++ b/crates/bevy_math/Cargo.toml @@ -13,4 +13,4 @@ glam = { version = "0.21", features = ["serde", "bytemuck"] } [features] # Enable interoperation of glam types with mint-compatible libraries -mint = ["glam/mint"] \ No newline at end of file +mint = ["glam/mint"]