From 8c0ce5280b5f89a408d12c4afd0562330290a97b Mon Sep 17 00:00:00 2001 From: Ame <104745335+ameknite@users.noreply.github.com> Date: Mon, 20 Nov 2023 19:04:14 -0600 Subject: [PATCH] Standardize toml format with taplo (#10594) # Objective - Standardize fmt for toml files ## Solution - Add [taplo](https://taplo.tamasfe.dev/) to CI (check for fmt and diff for toml files), for context taplo is used by the most popular extension in VScode [Even Better TOML](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml - Add contribution section to explain toml fmt with taplo. Now to pass CI you need to run `taplo fmt --option indent_string=" "` or if you use vscode have the `Even Better TOML` extension with 4 spaces for indent --------- Co-authored-by: Alice Cecile --- .github/workflows/ci.yml | 20 ++++ CONTRIBUTING.md | 11 +- crates/bevy_animation/Cargo.toml | 4 +- crates/bevy_app/Cargo.toml | 2 +- crates/bevy_audio/Cargo.toml | 8 +- crates/bevy_core/Cargo.toml | 12 +- crates/bevy_core_pipeline/Cargo.toml | 4 +- crates/bevy_diagnostic/Cargo.toml | 2 +- crates/bevy_gltf/Cargo.toml | 26 +++-- crates/bevy_hierarchy/Cargo.toml | 8 +- crates/bevy_input/Cargo.toml | 2 +- crates/bevy_internal/Cargo.toml | 58 +++++++--- crates/bevy_log/Cargo.toml | 7 +- .../bevy_macros_compile_fail_tests/Cargo.toml | 2 +- crates/bevy_mikktspace/Cargo.toml | 6 +- crates/bevy_pbr/Cargo.toml | 4 +- crates/bevy_reflect/Cargo.toml | 8 +- crates/bevy_render/Cargo.toml | 27 +++-- crates/bevy_scene/Cargo.toml | 4 +- crates/bevy_sprite/Cargo.toml | 2 +- crates/bevy_text/Cargo.toml | 6 +- crates/bevy_time/Cargo.toml | 8 +- crates/bevy_transform/Cargo.toml | 8 +- crates/bevy_ui/Cargo.toml | 2 +- crates/bevy_window/Cargo.toml | 2 +- crates/bevy_winit/Cargo.toml | 2 +- deny.toml | 104 +++++++++--------- docs/profiling.md | 2 +- tools/build-templated-pages/Cargo.toml | 2 +- 29 files changed, 227 insertions(+), 126 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 440f342269041..7da6ab768c1da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -163,6 +163,26 @@ jobs: VALIDATE_MARKDOWN: true DEFAULT_BRANCH: main + toml: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - name: Install taplo + run: | + curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz \ + | gzip -d - \ + | install -m 755 /dev/stdin /usr/local/bin/taplo + - name: Run Taplo + id: taplo + run: taplo fmt --check --diff + - name: Taplo info + if: failure() + run: | + echo 'To fix toml fmt, please run `taplo fmt`' + echo 'Or if you use VSCode, use the Even Better Toml extension' + + run-examples-on-windows-dx12: runs-on: windows-latest timeout-minutes: 60 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 77e190abd1ca4..d2130b9f6853b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -339,9 +339,14 @@ If you're new to Bevy, here's the workflow we use: To locally lint your files using the same workflow as our CI: 1. Install [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli). 2. Run `markdownlint -f -c .github/linters/.markdown-lint.yml .` in the root directory of the Bevy project. -5. Push your changes to your fork on Github and open a Pull Request. -6. Respond to any CI failures or review feedback. While CI failures must be fixed before we can merge your PR, you do not need to *agree* with all feedback from your reviews, merely acknowledge that it was given. If you cannot come to an agreement, leave the thread open and defer to a Maintainer or Project Lead's final judgement. -7. When your PR is ready to merge, a Maintainer or Project Lead will review it and suggest final changes. If those changes are minimal they may even apply them directly to speed up merging. + +5. When working with Toml (`.toml`) files, Bevy's CI will check toml files using [taplo](https://taplo.tamasfe.dev/): `taplo fmt --check --diff` + 1. If you use VSCode, install [Even better toml](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml) and format your files. + 2. If you want to use the cli tool, install [taplo-cli](https://taplo.tamasfe.dev/cli/installation/cargo.html) and run `taplo fmt --check --diff` to check for the formatting. Fix any issues by running `taplo fmt` in the root directory of the Bevy project. + +6. Push your changes to your fork on Github and open a Pull Request. +7. Respond to any CI failures or review feedback. While CI failures must be fixed before we can merge your PR, you do not need to *agree* with all feedback from your reviews, merely acknowledge that it was given. If you cannot come to an agreement, leave the thread open and defer to a Maintainer or Project Lead's final judgement. +8. When your PR is ready to merge, a Maintainer or Project Lead will review it and suggest final changes. If those changes are minimal they may even apply them directly to speed up merging. If you end up adding a new official Bevy crate to the `bevy` repo: diff --git a/crates/bevy_animation/Cargo.toml b/crates/bevy_animation/Cargo.toml index 698c243f23156..f2d5da4cd7dbf 100644 --- a/crates/bevy_animation/Cargo.toml +++ b/crates/bevy_animation/Cargo.toml @@ -14,7 +14,9 @@ bevy_app = { path = "../bevy_app", version = "0.12.0" } bevy_asset = { path = "../bevy_asset", version = "0.12.0" } bevy_core = { path = "../bevy_core", version = "0.12.0" } bevy_math = { path = "../bevy_math", version = "0.12.0" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ + "bevy", +] } bevy_render = { path = "../bevy_render", version = "0.12.0" } bevy_time = { path = "../bevy_time", version = "0.12.0" } bevy_utils = { path = "../bevy_utils", version = "0.12.0" } diff --git a/crates/bevy_app/Cargo.toml b/crates/bevy_app/Cargo.toml index db5ed32e74014..88bcfbbba4a90 100644 --- a/crates/bevy_app/Cargo.toml +++ b/crates/bevy_app/Cargo.toml @@ -30,7 +30,7 @@ downcast-rs = "1.2.0" [target.'cfg(target_arch = "wasm32")'.dependencies] wasm-bindgen = { version = "0.2" } -web-sys = { version = "0.3", features = [ "Window" ] } +web-sys = { version = "0.3", features = ["Window"] } [lints] workspace = true diff --git a/crates/bevy_audio/Cargo.toml b/crates/bevy_audio/Cargo.toml index 60de4c82af4ad..ea1e22b283ce9 100644 --- a/crates/bevy_audio/Cargo.toml +++ b/crates/bevy_audio/Cargo.toml @@ -14,7 +14,9 @@ bevy_app = { path = "../bevy_app", version = "0.12.0" } bevy_asset = { path = "../bevy_asset", version = "0.12.0" } bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } bevy_math = { path = "../bevy_math", version = "0.12.0" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ + "bevy", +] } bevy_transform = { path = "../bevy_transform", version = "0.12.0" } bevy_derive = { path = "../bevy_derive", version = "0.12.0" } bevy_utils = { path = "../bevy_utils", version = "0.12.0" } @@ -26,7 +28,9 @@ rodio = { version = "0.17", default-features = false } oboe = { version = "0.5", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] -rodio = { version = "0.17", default-features = false, features = ["wasm-bindgen"] } +rodio = { version = "0.17", default-features = false, features = [ + "wasm-bindgen", +] } [features] mp3 = ["rodio/mp3"] diff --git a/crates/bevy_core/Cargo.toml b/crates/bevy_core/Cargo.toml index 3ca9f6b46c769..fd46c35c40542 100644 --- a/crates/bevy_core/Cargo.toml +++ b/crates/bevy_core/Cargo.toml @@ -11,10 +11,16 @@ keywords = ["bevy"] [dependencies] # bevy -bevy_app = { path = "../bevy_app", version = "0.12.0", features = ["bevy_reflect"] } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = ["bevy_reflect"] } +bevy_app = { path = "../bevy_app", version = "0.12.0", features = [ + "bevy_reflect", +] } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = [ + "bevy_reflect", +] } bevy_math = { path = "../bevy_math", version = "0.12.0" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ + "bevy", +] } bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" } bevy_utils = { path = "../bevy_utils", version = "0.12.0" } diff --git a/crates/bevy_core_pipeline/Cargo.toml b/crates/bevy_core_pipeline/Cargo.toml index 394ffe67f1f4a..cab1cb55e96a7 100644 --- a/crates/bevy_core_pipeline/Cargo.toml +++ b/crates/bevy_core_pipeline/Cargo.toml @@ -3,8 +3,8 @@ name = "bevy_core_pipeline" version = "0.12.0" edition = "2021" authors = [ - "Bevy Contributors ", - "Carter Anderson ", + "Bevy Contributors ", + "Carter Anderson ", ] description = "Provides a core render pipeline for Bevy Engine." homepage = "https://bevyengine.org" diff --git a/crates/bevy_diagnostic/Cargo.toml b/crates/bevy_diagnostic/Cargo.toml index cfbc41b295abd..dec3647ce9b6c 100644 --- a/crates/bevy_diagnostic/Cargo.toml +++ b/crates/bevy_diagnostic/Cargo.toml @@ -25,7 +25,7 @@ bevy_utils = { path = "../bevy_utils", version = "0.12.0" } [target.'cfg(all(target_os="macos"))'.dependencies] # Some features of sysinfo are not supported by apple. This will disable those features on apple devices sysinfo = { version = "0.29.0", default-features = false, features = [ - "apple-app-store", + "apple-app-store", ] } # Only include when not bevy_dynamic_plugin and on linux/windows/android diff --git a/crates/bevy_gltf/Cargo.toml b/crates/bevy_gltf/Cargo.toml index a6339679fd31f..1454fa94e00f2 100644 --- a/crates/bevy_gltf/Cargo.toml +++ b/crates/bevy_gltf/Cargo.toml @@ -23,24 +23,28 @@ bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" } bevy_log = { path = "../bevy_log", version = "0.12.0" } bevy_math = { path = "../bevy_math", version = "0.12.0" } bevy_pbr = { path = "../bevy_pbr", version = "0.12.0" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ + "bevy", +] } bevy_render = { path = "../bevy_render", version = "0.12.0" } -bevy_scene = { path = "../bevy_scene", version = "0.12.0", features = ["bevy_render"] } +bevy_scene = { path = "../bevy_scene", version = "0.12.0", features = [ + "bevy_render", +] } bevy_transform = { path = "../bevy_transform", version = "0.12.0" } bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" } bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # other gltf = { version = "1.3.0", default-features = false, features = [ - "KHR_lights_punctual", - "KHR_materials_transmission", - "KHR_materials_ior", - "KHR_materials_volume", - "KHR_materials_unlit", - "KHR_materials_emissive_strength", - "extras", - "names", - "utils", + "KHR_lights_punctual", + "KHR_materials_transmission", + "KHR_materials_ior", + "KHR_materials_volume", + "KHR_materials_unlit", + "KHR_materials_emissive_strength", + "extras", + "names", + "utils", ] } thiserror = "1.0" base64 = "0.13.0" diff --git a/crates/bevy_hierarchy/Cargo.toml b/crates/bevy_hierarchy/Cargo.toml index 1f425a1f5b906..03b7dadf64ba9 100644 --- a/crates/bevy_hierarchy/Cargo.toml +++ b/crates/bevy_hierarchy/Cargo.toml @@ -15,9 +15,13 @@ trace = [] # bevy bevy_app = { path = "../bevy_app", version = "0.12.0" } bevy_core = { path = "../bevy_core", version = "0.12.0" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = ["bevy_reflect"] } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = [ + "bevy_reflect", +] } bevy_log = { path = "../bevy_log", version = "0.12.0" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ + "bevy", +] } bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # other diff --git a/crates/bevy_input/Cargo.toml b/crates/bevy_input/Cargo.toml index a744fde616ed4..4292633430b63 100644 --- a/crates/bevy_input/Cargo.toml +++ b/crates/bevy_input/Cargo.toml @@ -19,7 +19,7 @@ bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } bevy_math = { path = "../bevy_math", version = "0.12.0" } bevy_utils = { path = "../bevy_utils", version = "0.12.0" } bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ - "glam", + "glam", ] } # other diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index 525d732c8999b..0563bb6a2122f 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -11,16 +11,16 @@ categories = ["game-engines", "graphics", "gui", "rendering"] [features] trace = [ - "bevy_app/trace", - "bevy_core_pipeline?/trace", - "bevy_ecs/trace", - "bevy_log/trace", - "bevy_render?/trace", - "bevy_hierarchy/trace", - "bevy_winit?/trace" + "bevy_app/trace", + "bevy_core_pipeline?/trace", + "bevy_ecs/trace", + "bevy_log/trace", + "bevy_render?/trace", + "bevy_hierarchy/trace", + "bevy_winit?/trace", ] -trace_chrome = [ "bevy_log/tracing-chrome" ] -trace_tracy = ["bevy_render?/tracing-tracy", "bevy_log/tracing-tracy" ] +trace_chrome = ["bevy_log/tracing-chrome"] +trace_tracy = ["bevy_render?/tracing-tracy", "bevy_log/tracing-tracy"] trace_tracy_memory = ["bevy_log/trace_tracy_memory"] wgpu_trace = ["bevy_render/wgpu_trace"] detailed_trace = ["bevy_utils/detailed_trace"] @@ -61,8 +61,20 @@ symphonia-wav = ["bevy_audio/symphonia-wav"] shader_format_glsl = ["bevy_render/shader_format_glsl"] shader_format_spirv = ["bevy_render/shader_format_spirv"] -serialize = ["bevy_core/serialize", "bevy_input/serialize", "bevy_time/serialize", "bevy_window/serialize", "bevy_transform/serialize", "bevy_math/serialize", "bevy_scene?/serialize"] -multi-threaded = ["bevy_asset/multi-threaded", "bevy_ecs/multi-threaded", "bevy_tasks/multi-threaded"] +serialize = [ + "bevy_core/serialize", + "bevy_input/serialize", + "bevy_time/serialize", + "bevy_window/serialize", + "bevy_transform/serialize", + "bevy_math/serialize", + "bevy_scene?/serialize", +] +multi-threaded = [ + "bevy_asset/multi-threaded", + "bevy_ecs/multi-threaded", + "bevy_tasks/multi-threaded", +] async-io = ["bevy_tasks/async-io"] # Display server protocol support (X11 is enabled by default) @@ -73,13 +85,27 @@ x11 = ["bevy_winit/x11"] subpixel_glyph_atlas = ["bevy_text/subpixel_glyph_atlas"] # Transmission textures in `StandardMaterial`: -pbr_transmission_textures = ["bevy_pbr?/pbr_transmission_textures", "bevy_gltf?/pbr_transmission_textures"] +pbr_transmission_textures = [ + "bevy_pbr?/pbr_transmission_textures", + "bevy_gltf?/pbr_transmission_textures", +] # Optimise for WebGL2 -webgl = ["bevy_core_pipeline?/webgl", "bevy_pbr?/webgl", "bevy_render?/webgl", "bevy_gizmos?/webgl", "bevy_sprite?/webgl"] +webgl = [ + "bevy_core_pipeline?/webgl", + "bevy_pbr?/webgl", + "bevy_render?/webgl", + "bevy_gizmos?/webgl", + "bevy_sprite?/webgl", +] # enable systems that allow for automated testing on CI -bevy_ci_testing = ["bevy_app/bevy_ci_testing", "bevy_time/bevy_ci_testing", "bevy_render?/bevy_ci_testing", "bevy_render?/ci_limits"] +bevy_ci_testing = [ + "bevy_app/bevy_ci_testing", + "bevy_time/bevy_ci_testing", + "bevy_render?/bevy_ci_testing", + "bevy_render?/ci_limits", +] # Enable animation support, and glTF animation loading animation = ["bevy_animation", "bevy_gltf?/bevy_animation"] @@ -131,7 +157,9 @@ bevy_input = { path = "../bevy_input", version = "0.12.0" } bevy_log = { path = "../bevy_log", version = "0.12.0" } bevy_math = { path = "../bevy_math", version = "0.12.0" } bevy_ptr = { path = "../bevy_ptr", version = "0.12.0" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ + "bevy", +] } bevy_time = { path = "../bevy_time", version = "0.12.0" } bevy_transform = { path = "../bevy_transform", version = "0.12.0" } bevy_utils = { path = "../bevy_utils", version = "0.12.0" } diff --git a/crates/bevy_log/Cargo.toml b/crates/bevy_log/Cargo.toml index 12b20caa4f707..9e9344d0583c3 100644 --- a/crates/bevy_log/Cargo.toml +++ b/crates/bevy_log/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0" keywords = ["bevy"] [features] -trace = [ "tracing-error" ] +trace = ["tracing-error"] trace_tracy_memory = ["dep:tracy-client"] [dependencies] @@ -17,7 +17,10 @@ bevy_app = { path = "../bevy_app", version = "0.12.0" } bevy_utils = { path = "../bevy_utils", version = "0.12.0" } bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } -tracing-subscriber = {version = "0.3.1", features = ["registry", "env-filter"]} +tracing-subscriber = { version = "0.3.1", features = [ + "registry", + "env-filter", +] } tracing-chrome = { version = "0.7.0", optional = true } tracing-tracy = { version = "0.10.0", optional = true } tracing-log = "0.1.2" diff --git a/crates/bevy_macros_compile_fail_tests/Cargo.toml b/crates/bevy_macros_compile_fail_tests/Cargo.toml index e5d0d19bec361..3b905610662f2 100644 --- a/crates/bevy_macros_compile_fail_tests/Cargo.toml +++ b/crates/bevy_macros_compile_fail_tests/Cargo.toml @@ -10,4 +10,4 @@ publish = false [dependencies] bevy_derive = { path = "../bevy_derive" } -trybuild = "1.0.71" \ No newline at end of file +trybuild = "1.0.71" diff --git a/crates/bevy_mikktspace/Cargo.toml b/crates/bevy_mikktspace/Cargo.toml index 9698b67301c5b..451e4e24a07a8 100644 --- a/crates/bevy_mikktspace/Cargo.toml +++ b/crates/bevy_mikktspace/Cargo.toml @@ -2,7 +2,11 @@ name = "bevy_mikktspace" version = "0.12.0" edition = "2021" -authors = ["Benjamin Wasty ", "David Harvey-Macaulay ", "Layl Bongers "] +authors = [ + "Benjamin Wasty ", + "David Harvey-Macaulay ", + "Layl Bongers ", +] description = "Mikkelsen tangent space algorithm" documentation = "https://docs.rs/bevy" homepage = "https://bevyengine.org" diff --git a/crates/bevy_pbr/Cargo.toml b/crates/bevy_pbr/Cargo.toml index d959af147b694..4980047775a0a 100644 --- a/crates/bevy_pbr/Cargo.toml +++ b/crates/bevy_pbr/Cargo.toml @@ -19,7 +19,9 @@ bevy_asset = { path = "../bevy_asset", version = "0.12.0" } bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0" } bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } bevy_math = { path = "../bevy_math", version = "0.12.0" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ + "bevy", +] } bevy_render = { path = "../bevy_render", version = "0.12.0" } bevy_transform = { path = "../bevy_transform", version = "0.12.0" } bevy_utils = { path = "../bevy_utils", version = "0.12.0" } diff --git a/crates/bevy_reflect/Cargo.toml b/crates/bevy_reflect/Cargo.toml index 80a85b8063b9b..e5261c34e2c7c 100644 --- a/crates/bevy_reflect/Cargo.toml +++ b/crates/bevy_reflect/Cargo.toml @@ -19,7 +19,7 @@ documentation = ["bevy_reflect_derive/documentation"] [dependencies] # bevy bevy_math = { path = "../bevy_math", version = "0.12.0", features = [ - "serialize", + "serialize", ], optional = true } bevy_reflect_derive = { path = "bevy_reflect_derive", version = "0.12.0" } bevy_utils = { path = "../bevy_utils", version = "0.12.0" } @@ -31,9 +31,9 @@ downcast-rs = "1.2" thiserror = "1.0" serde = "1" smallvec = { version = "1.6", features = [ - "serde", - "union", - "const_generics", + "serde", + "union", + "const_generics", ], optional = true } glam = { version = "0.24.1", features = ["serde"], optional = true } smol_str = { version = "0.2.0", optional = true } diff --git a/crates/bevy_render/Cargo.toml b/crates/bevy_render/Cargo.toml index caac932cf0495..6d9f78b7f3d8e 100644 --- a/crates/bevy_render/Cargo.toml +++ b/crates/bevy_render/Cargo.toml @@ -45,7 +45,9 @@ bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" } bevy_log = { path = "../bevy_log", version = "0.12.0" } bevy_math = { path = "../bevy_math", version = "0.12.0" } bevy_mikktspace = { path = "../bevy_mikktspace", version = "0.12.0" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ + "bevy", +] } bevy_render_macros = { path = "macros", version = "0.12.0" } bevy_time = { path = "../bevy_time", version = "0.12.0" } bevy_transform = { path = "../bevy_transform", version = "0.12.0" } @@ -60,7 +62,10 @@ image = { version = "0.24", default-features = false } codespan-reporting = "0.11.0" # `fragile-send-sync-non-atomic-wasm` feature means we can't use WASM threads for rendering # It is enabled for now to avoid having to do a significant overhaul of the renderer just for wasm -wgpu = { version = "0.17.1", features = ["naga", "fragile-send-sync-non-atomic-wasm"] } +wgpu = { version = "0.17.1", features = [ + "naga", + "fragile-send-sync-non-atomic-wasm", +] } naga = { version = "0.13.0", features = ["wgsl-in"] } naga_oil = "0.10" serde = { version = "1", features = ["derive"] } @@ -81,19 +86,21 @@ ruzstd = { version = "0.4.0", optional = true } basis-universal = { version = "0.3.0", optional = true } encase = { version = "0.6.1", features = ["glam"] } # For wgpu profiling using tracing. Use `RUST_LOG=info` to also capture the wgpu spans. -profiling = { version = "1", features = ["profile-with-tracing"], optional = true } +profiling = { version = "1", features = [ + "profile-with-tracing", +], optional = true } async-channel = "1.8" [target.'cfg(target_arch = "wasm32")'.dependencies] js-sys = "0.3" web-sys = { version = "0.3", features = [ - 'Blob', - 'Document', - 'Element', - 'HtmlElement', - 'Node', - 'Url', - 'Window', + 'Blob', + 'Document', + 'Element', + 'HtmlElement', + 'Node', + 'Url', + 'Window', ] } wasm-bindgen = "0.2" diff --git a/crates/bevy_scene/Cargo.toml b/crates/bevy_scene/Cargo.toml index 9732d8c05318f..a08f4d483fd5e 100644 --- a/crates/bevy_scene/Cargo.toml +++ b/crates/bevy_scene/Cargo.toml @@ -18,7 +18,9 @@ bevy_app = { path = "../bevy_app", version = "0.12.0" } bevy_asset = { path = "../bevy_asset", version = "0.12.0" } bevy_derive = { path = "../bevy_derive", version = "0.12.0" } bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ + "bevy", +] } bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" } bevy_transform = { path = "../bevy_transform", version = "0.12.0" } bevy_utils = { path = "../bevy_utils", version = "0.12.0" } diff --git a/crates/bevy_sprite/Cargo.toml b/crates/bevy_sprite/Cargo.toml index ec2081d05aabb..b09603430abce 100644 --- a/crates/bevy_sprite/Cargo.toml +++ b/crates/bevy_sprite/Cargo.toml @@ -20,7 +20,7 @@ bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } bevy_log = { path = "../bevy_log", version = "0.12.0" } bevy_math = { path = "../bevy_math", version = "0.12.0" } bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ - "bevy", + "bevy", ] } bevy_render = { path = "../bevy_render", version = "0.12.0" } bevy_transform = { path = "../bevy_transform", version = "0.12.0" } diff --git a/crates/bevy_text/Cargo.toml b/crates/bevy_text/Cargo.toml index 8218b578fb6e1..4c9e51609cb5e 100644 --- a/crates/bevy_text/Cargo.toml +++ b/crates/bevy_text/Cargo.toml @@ -18,7 +18,9 @@ bevy_app = { path = "../bevy_app", version = "0.12.0" } bevy_asset = { path = "../bevy_asset", version = "0.12.0" } bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } bevy_math = { path = "../bevy_math", version = "0.12.0" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ + "bevy", +] } bevy_render = { path = "../bevy_render", version = "0.12.0" } bevy_sprite = { path = "../bevy_sprite", version = "0.12.0" } bevy_transform = { path = "../bevy_transform", version = "0.12.0" } @@ -29,7 +31,7 @@ bevy_utils = { path = "../bevy_utils", version = "0.12.0" } ab_glyph = "0.2.6" glyph_brush_layout = "0.2.1" thiserror = "1.0" -serde = {version = "1", features = ["derive"]} +serde = { version = "1", features = ["derive"] } [lints] workspace = true diff --git a/crates/bevy_time/Cargo.toml b/crates/bevy_time/Cargo.toml index 9013a624af8e2..f4399a779b323 100644 --- a/crates/bevy_time/Cargo.toml +++ b/crates/bevy_time/Cargo.toml @@ -16,8 +16,12 @@ bevy_ci_testing = ["bevy_app/bevy_ci_testing"] [dependencies] # bevy bevy_app = { path = "../bevy_app", version = "0.12.0" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = ["bevy_reflect"] } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = [ + "bevy_reflect", +] } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ + "bevy", +] } bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # other diff --git a/crates/bevy_transform/Cargo.toml b/crates/bevy_transform/Cargo.toml index 344e25b0364d5..4bd7ea5724a54 100644 --- a/crates/bevy_transform/Cargo.toml +++ b/crates/bevy_transform/Cargo.toml @@ -11,10 +11,14 @@ keywords = ["bevy"] [dependencies] # bevy bevy_app = { path = "../bevy_app", version = "0.12.0" } -bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = ["bevy_reflect"] } +bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = [ + "bevy_reflect", +] } bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" } bevy_math = { path = "../bevy_math", version = "0.12.0" } -bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] } +bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ + "bevy", +] } serde = { version = "1", features = ["derive"], optional = true } thiserror = "1.0" diff --git a/crates/bevy_ui/Cargo.toml b/crates/bevy_ui/Cargo.toml index b92213b63ec4c..969fd3efff5fb 100644 --- a/crates/bevy_ui/Cargo.toml +++ b/crates/bevy_ui/Cargo.toml @@ -21,7 +21,7 @@ bevy_input = { path = "../bevy_input", version = "0.12.0" } bevy_log = { path = "../bevy_log", version = "0.12.0" } bevy_math = { path = "../bevy_math", version = "0.12.0" } bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ - "bevy", + "bevy", ] } bevy_render = { path = "../bevy_render", version = "0.12.0" } bevy_sprite = { path = "../bevy_sprite", version = "0.12.0" } diff --git a/crates/bevy_window/Cargo.toml b/crates/bevy_window/Cargo.toml index 5743d1ebf555d..a0561c8e83a1c 100644 --- a/crates/bevy_window/Cargo.toml +++ b/crates/bevy_window/Cargo.toml @@ -19,7 +19,7 @@ bevy_app = { path = "../bevy_app", version = "0.12.0" } bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } bevy_math = { path = "../bevy_math", version = "0.12.0" } bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [ - "glam", + "glam", ] } bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # Used for close_on_esc diff --git a/crates/bevy_winit/Cargo.toml b/crates/bevy_winit/Cargo.toml index b3fc28ab47340..c16abf9d951e4 100644 --- a/crates/bevy_winit/Cargo.toml +++ b/crates/bevy_winit/Cargo.toml @@ -35,7 +35,7 @@ raw-window-handle = "0.5" [target.'cfg(target_os = "android")'.dependencies] winit = { version = "0.28.7", default-features = false, features = [ - "android-native-activity", + "android-native-activity", ] } [target.'cfg(target_arch = "wasm32")'.dependencies] diff --git a/deny.toml b/deny.toml index 538f10a135f59..5d68e5ea5e5d7 100644 --- a/deny.toml +++ b/deny.toml @@ -14,56 +14,56 @@ unlicensed = "deny" copyleft = "deny" default = "deny" allow = [ - "MIT", - "MIT-0", - "Apache-2.0", - "BSD-3-Clause", - "ISC", - "Zlib", - "0BSD", - "BSD-2-Clause", - "CC0-1.0", + "MIT", + "MIT-0", + "Apache-2.0", + "BSD-3-Clause", + "ISC", + "Zlib", + "0BSD", + "BSD-2-Clause", + "CC0-1.0", ] exceptions = [ - { name = "unicode-ident", allow = [ - "Unicode-DFS-2016", - ] }, - { name = "symphonia-bundle-flac", allow = [ - "MPL-2.0", - ] }, - { name = "symphonia-bundle-mp3", allow = [ - "MPL-2.0", - ] }, - { name = "symphonia-codec-aac", allow = [ - "MPL-2.0", - ] }, - { name = "symphonia-codec-adpcm", allow = [ - "MPL-2.0", - ] }, - { name = "symphonia-codec-pcm", allow = [ - "MPL-2.0", - ] }, - { name = "symphonia-codec-vorbis", allow = [ - "MPL-2.0", - ] }, - { name = "symphonia-core", allow = [ - "MPL-2.0", - ] }, - { name = "symphonia-format-isomp4", allow = [ - "MPL-2.0", - ] }, - { name = "symphonia-format-wav", allow = [ - "MPL-2.0", - ] }, - { name = "symphonia-metadata", allow = [ - "MPL-2.0", - ] }, - { name = "symphonia-utils-xiph", allow = [ - "MPL-2.0", - ] }, - { name = "symphonia", allow = [ - "MPL-2.0", - ] }, + { name = "unicode-ident", allow = [ + "Unicode-DFS-2016", + ] }, + { name = "symphonia-bundle-flac", allow = [ + "MPL-2.0", + ] }, + { name = "symphonia-bundle-mp3", allow = [ + "MPL-2.0", + ] }, + { name = "symphonia-codec-aac", allow = [ + "MPL-2.0", + ] }, + { name = "symphonia-codec-adpcm", allow = [ + "MPL-2.0", + ] }, + { name = "symphonia-codec-pcm", allow = [ + "MPL-2.0", + ] }, + { name = "symphonia-codec-vorbis", allow = [ + "MPL-2.0", + ] }, + { name = "symphonia-core", allow = [ + "MPL-2.0", + ] }, + { name = "symphonia-format-isomp4", allow = [ + "MPL-2.0", + ] }, + { name = "symphonia-format-wav", allow = [ + "MPL-2.0", + ] }, + { name = "symphonia-metadata", allow = [ + "MPL-2.0", + ] }, + { name = "symphonia-utils-xiph", allow = [ + "MPL-2.0", + ] }, + { name = "symphonia", allow = [ + "MPL-2.0", + ] }, ] [bans] @@ -71,10 +71,10 @@ multiple-versions = "warn" wildcards = "deny" # Certain crates that we don't want multiple versions of in the dependency tree deny = [ - { name = "ahash", deny-multiple-versions = true }, - { name = "android-activity", deny-multiple-versions = true }, - { name = "glam", deny-multiple-versions = true }, - { name = "raw-window-handle", deny-multiple-versions = true }, + { name = "ahash", deny-multiple-versions = true }, + { name = "android-activity", deny-multiple-versions = true }, + { name = "glam", deny-multiple-versions = true }, + { name = "raw-window-handle", deny-multiple-versions = true }, ] [sources] diff --git a/docs/profiling.md b/docs/profiling.md index 7ae7af39b8058..7f0dc155cbfbc 100644 --- a/docs/profiling.md +++ b/docs/profiling.md @@ -40,7 +40,7 @@ The [Tracy profiling tool](https://github.com/wolfpld/tracy) is: There are binaries available for Windows, and installation / build instructions for other operating systems can be found in the [Tracy documentation PDF](https://github.com/wolfpld/tracy/releases/latest/download/tracy.pdf). -It has a command line capture tool that can record the execution of graphical applications, saving it as a profile file. Tracy has a GUI to inspect these profile files. The GUI app also supports live capture, showing you in real time the trace of your app. The version of tracy must be matched to the version of tracing-tracy used in bevy. A compatibility table can be found on [crates.io](https://crates.io/crates/tracing-tracy) and the version used can be found [here](https://github.com/bevyengine/bevy/blob/latest/crates/bevy_log/Cargo.toml#L22). +It has a command line capture tool that can record the execution of graphical applications, saving it as a profile file. Tracy has a GUI to inspect these profile files. The GUI app also supports live capture, showing you in real time the trace of your app. The version of tracy must be matched to the version of tracing-tracy used in bevy. A compatibility table can be found on [crates.io](https://crates.io/crates/tracing-tracy) and the version used can be found [here](https://github.com/bevyengine/bevy/blob/latest/crates/bevy_log/Cargo.toml#L25). In one terminal, run: `./capture-release -o my_capture.tracy` diff --git a/tools/build-templated-pages/Cargo.toml b/tools/build-templated-pages/Cargo.toml index 0e09eb2cedbb5..2edb38f88a145 100644 --- a/tools/build-templated-pages/Cargo.toml +++ b/tools/build-templated-pages/Cargo.toml @@ -9,5 +9,5 @@ license = "MIT OR Apache-2.0" [dependencies] toml_edit = "0.20" tera = "1.15" -serde = { version = "1.0", features = [ "derive" ] } +serde = { version = "1.0", features = ["derive"] } bitflags = "2.3"