Skip to content

Commit de66c5c

Browse files
authored
Merge branch 'main' into thin_column_sparse_set
2 parents 603f544 + 1791494 commit de66c5c

File tree

743 files changed

+25771
-12355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

743 files changed

+25771
-12355
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,3 @@ println!("My super cool code.");
3636
```
3737

3838
</details>
39-
40-
## Migration Guide
41-
42-
> This section is optional. If there are no breaking changes, you can delete this section.
43-
44-
- If this PR is a breaking change (relative to the last release of Bevy), describe how a user might need to migrate their code to support these changes
45-
- Simply adding new functionality is not a breaking change.
46-
- Fixing behavior that was definitely a bug, rather than a questionable design choice is not a breaking change.

.github/workflows/action-on-PR-labeled.yml

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,63 @@ permissions:
1212
pull-requests: 'write'
1313

1414
jobs:
15-
comment-on-breaking-change-label:
15+
comment-on-migration-guide-label:
1616
runs-on: ubuntu-latest
17-
if: github.event.label.name == 'M-Needs-Migration-Guide' && !contains(github.event.pull_request.body, '## Migration Guide')
17+
if: github.event.label.name == 'M-Needs-Migration-Guide'
1818
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event.pull_request.head.sha }}
22+
fetch-depth: 2
23+
- name: Get changes
24+
id: get_changes
25+
shell: bash {0}
26+
run: |
27+
git fetch --depth=1 origin $BASE_SHA
28+
git diff --exit-code $BASE_SHA $HEAD_SHA -- ./release-content/migration-guides
29+
echo "found_changes=$?" >> $GITHUB_OUTPUT
30+
env:
31+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
32+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
33+
- uses: actions/github-script@v7
34+
if: steps.get_changes.outputs.found_changes == '0'
35+
with:
36+
script: |
37+
await github.rest.issues.createComment({
38+
issue_number: context.issue.number,
39+
owner: context.repo.owner,
40+
repo: context.repo.repo,
41+
body: `It looks like your PR is a breaking change, but **you didn't provide a migration guide**.
42+
43+
Please review the [instructions for writing migration guides](https://github.com/bevyengine/bevy/tree/main/release-content/migration_guides.md), then expand or revise the content in the [migration guides directory](https://github.com/bevyengine/bevy/tree/main/release-content/migration-guides) to reflect your changes.`
44+
})
45+
comment-on-release-note-label:
46+
runs-on: ubuntu-latest
47+
if: github.event.label.name == 'M-Needs-Release-Note'
48+
steps:
49+
- uses: actions/checkout@v4
50+
with:
51+
ref: ${{ github.event.pull_request.head.sha }}
52+
fetch-depth: 2
53+
- name: Get changes
54+
id: get_changes
55+
shell: bash {0}
56+
run: |
57+
git fetch --depth=1 origin $BASE_SHA
58+
git diff --exit-code $BASE_SHA $HEAD_SHA -- ./release-content/release-notes
59+
echo "found_changes=$?" >> $GITHUB_OUTPUT
60+
env:
61+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
62+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
1963
- uses: actions/github-script@v7
64+
if: steps.get_changes.outputs.found_changes == '0'
2065
with:
2166
script: |
2267
await github.rest.issues.createComment({
2368
issue_number: context.issue.number,
2469
owner: context.repo.owner,
2570
repo: context.repo.repo,
26-
body: `It looks like your PR is a breaking change, but you didn't provide a migration guide.
71+
body: `It looks like your PR has been selected for a highlight in the next release blog post, but **you didn't provide a release note**.
2772
28-
Could you add some context on what users should update when this change get released in a new version of Bevy?
29-
It will be used to help writing the migration guide for the version. Putting it after a \`## Migration Guide\` will help it get automatically picked up by our tooling.`
73+
Please review the [instructions for writing release notes](https://github.com/bevyengine/bevy/tree/main/release-content/release_notes.md), then expand or revise the content in the [release notes directory](https://github.com/bevyengine/bevy/tree/main/release-content/release_notes) to showcase your changes.`
3074
})

.github/workflows/ci.yml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ env:
1313
CARGO_PROFILE_TEST_DEBUG: 0
1414
CARGO_PROFILE_DEV_DEBUG: 0
1515
# If nightly is breaking CI, modify this variable to target a specific nightly version.
16-
NIGHTLY_TOOLCHAIN: nightly
16+
NIGHTLY_TOOLCHAIN: nightly-2025-05-16 # pinned until a fix for https://github.com/rust-lang/miri/issues/4323 is released
1717
RUSTFLAGS: "-D warnings"
18+
BINSTALL_VERSION: "v1.12.3"
1819

1920
concurrency:
2021
group: ${{github.workflow}}-${{github.ref}}
@@ -177,6 +178,31 @@ jobs:
177178
- name: Check Compile
178179
run: cargo check -p bevy --no-default-features --features default_no_std --target thumbv6m-none-eabi
179180

181+
check-compiles-no-std-examples:
182+
runs-on: ubuntu-latest
183+
timeout-minutes: 30
184+
needs: ci
185+
steps:
186+
- uses: actions/checkout@v4
187+
- uses: actions/cache@v4
188+
with:
189+
path: |
190+
~/.cargo/bin/
191+
~/.cargo/registry/index/
192+
~/.cargo/registry/cache/
193+
~/.cargo/git/db/
194+
target/
195+
crates/bevy_ecs_compile_fail_tests/target/
196+
crates/bevy_reflect_compile_fail_tests/target/
197+
key: ${{ runner.os }}-cargo-check-compiles-no-std-examples-${{ hashFiles('**/Cargo.toml') }}
198+
- uses: dtolnay/rust-toolchain@stable
199+
with:
200+
targets: x86_64-unknown-none
201+
- name: Install Linux dependencies
202+
uses: ./.github/actions/install-linux-deps
203+
- name: Check Compile
204+
run: cd examples/no_std/library && cargo check --no-default-features --features libm,critical-section --target x86_64-unknown-none
205+
180206
build-wasm:
181207
runs-on: ubuntu-latest
182208
timeout-minutes: 30
@@ -246,9 +272,9 @@ jobs:
246272
timeout-minutes: 30
247273
steps:
248274
- uses: actions/checkout@v4
249-
- uses: dtolnay/rust-toolchain@stable
275+
- uses: cargo-bins/[email protected]
250276
- name: Install taplo
251-
run: cargo install taplo-cli --locked
277+
run: cargo binstall taplo-cli@0.9.3 --locked
252278
- name: Run Taplo
253279
id: taplo
254280
run: taplo fmt --check --diff
@@ -267,7 +293,7 @@ jobs:
267293
steps:
268294
- uses: actions/checkout@v4
269295
- name: Check for typos
270-
uses: crate-ci/typos@v1.30.2
296+
uses: crate-ci/typos@v1.32.0
271297
- name: Typos info
272298
if: failure()
273299
run: |
@@ -428,7 +454,7 @@ jobs:
428454
shell: bash
429455
run: |
430456
errors=""
431-
for file in $(find examples tests -name '*.rs'); do
457+
for file in $(find examples tests -name '*.rs' -not -path 'examples/mobile/*'); do
432458
if grep -q "use bevy_" "$file"; then
433459
errors+="ERROR: Detected internal Bevy import in $file\n"
434460
fi

Cargo.toml

Lines changed: 76 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ members = [
2626
"crates/bevy_reflect/compile_fail",
2727
# Examples of compiling Bevy for mobile platforms.
2828
"examples/mobile",
29+
# Examples of using Bevy on no_std platforms.
30+
"examples/no_std/*",
2931
# Benchmarks
3032
"benches",
3133
# Internal tools that are not published.
@@ -131,6 +133,7 @@ default = [
131133
"bevy_audio",
132134
"bevy_color",
133135
"bevy_core_pipeline",
136+
"bevy_anti_aliasing",
134137
"bevy_gilrs",
135138
"bevy_gizmos",
136139
"bevy_gltf",
@@ -211,6 +214,13 @@ bevy_core_pipeline = [
211214
"bevy_render",
212215
]
213216

217+
# Provides various anti aliasing solutions
218+
bevy_anti_aliasing = [
219+
"bevy_internal/bevy_anti_aliasing",
220+
"bevy_asset",
221+
"bevy_render",
222+
]
223+
214224
# Adds gamepad support
215225
bevy_gilrs = ["bevy_internal/bevy_gilrs"]
216226

@@ -223,6 +233,7 @@ bevy_pbr = [
223233
"bevy_asset",
224234
"bevy_render",
225235
"bevy_core_pipeline",
236+
"bevy_anti_aliasing",
226237
]
227238

228239
# Provides picking functionality
@@ -240,6 +251,7 @@ bevy_sprite = [
240251
"bevy_render",
241252
"bevy_core_pipeline",
242253
"bevy_color",
254+
"bevy_anti_aliasing",
243255
]
244256

245257
# Provides text functionality
@@ -252,6 +264,7 @@ bevy_ui = [
252264
"bevy_text",
253265
"bevy_sprite",
254266
"bevy_color",
267+
"bevy_anti_aliasing",
255268
]
256269

257270
# Windowing layer
@@ -556,7 +569,7 @@ hyper = { version = "1", features = ["server", "http1"] }
556569
http-body-util = "0.1"
557570
anyhow = "1"
558571
macro_rules_attribute = "0.2"
559-
accesskit = "0.17"
572+
accesskit = "0.18"
560573
nonmax = "0.5"
561574

562575
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
@@ -1576,6 +1589,7 @@ wasm = true
15761589
name = "headless"
15771590
path = "examples/app/headless.rs"
15781591
doc-scrape-examples = true
1592+
required-features = ["bevy_log"]
15791593

15801594
[package.metadata.example.headless]
15811595
name = "Headless"
@@ -2206,14 +2220,14 @@ category = "ECS (Entity Component System)"
22062220
wasm = false
22072221

22082222
[[example]]
2209-
name = "fallible_systems"
2210-
path = "examples/ecs/fallible_systems.rs"
2223+
name = "error_handling"
2224+
path = "examples/ecs/error_handling.rs"
22112225
doc-scrape-examples = true
22122226
required-features = ["bevy_mesh_picking_backend"]
22132227

2214-
[package.metadata.example.fallible_systems]
2215-
name = "Fallible Systems"
2216-
description = "Systems that return results to handle errors"
2228+
[package.metadata.example.error_handling]
2229+
name = "Error handling"
2230+
description = "How to return and handle errors across the ECS"
22172231
category = "ECS (Entity Component System)"
22182232
wasm = false
22192233

@@ -2287,6 +2301,17 @@ description = "Pipe the output of one system into a second, allowing you to hand
22872301
category = "ECS (Entity Component System)"
22882302
wasm = false
22892303

2304+
[[example]]
2305+
name = "state_scoped"
2306+
path = "examples/ecs/state_scoped.rs"
2307+
doc-scrape-examples = true
2308+
2309+
[package.metadata.example.state_scoped]
2310+
name = "State Scoped"
2311+
description = "Shows how to spawn entities that are automatically despawned either when entering or exiting specific game states."
2312+
category = "ECS (Entity Component System)"
2313+
wasm = false
2314+
22902315
[[example]]
22912316
name = "system_closure"
22922317
path = "examples/ecs/system_closure.rs"
@@ -3326,6 +3351,17 @@ description = "Illustrates creating and updating text"
33263351
category = "UI (User Interface)"
33273352
wasm = true
33283353

3354+
[[example]]
3355+
name = "text_background_colors"
3356+
path = "examples/ui/text_background_colors.rs"
3357+
doc-scrape-examples = true
3358+
3359+
[package.metadata.example.text_background_colors]
3360+
name = "Text Background Colors"
3361+
description = "Demonstrates text background colors"
3362+
category = "UI (User Interface)"
3363+
wasm = true
3364+
33293365
[[example]]
33303366
name = "text_debug"
33313367
path = "examples/ui/text_debug.rs"
@@ -3481,6 +3517,17 @@ description = "An example for debugging viewport coordinates"
34813517
category = "UI (User Interface)"
34823518
wasm = true
34833519

3520+
[[example]]
3521+
name = "viewport_node"
3522+
path = "examples/ui/viewport_node.rs"
3523+
doc-scrape-examples = true
3524+
3525+
[package.metadata.example.viewport_node]
3526+
name = "Viewport Node"
3527+
description = "Demonstrates how to create a viewport node with picking support"
3528+
category = "UI (User Interface)"
3529+
wasm = true
3530+
34843531
# Window
34853532
[[example]]
34863533
name = "clear_color"
@@ -4287,3 +4334,26 @@ name = "Widgets"
42874334
description = "Example UI Widgets"
42884335
category = "Helpers"
42894336
wasm = true
4337+
4338+
[[example]]
4339+
name = "no_std_library"
4340+
path = "examples/no_std/library/src/lib.rs"
4341+
doc-scrape-examples = true
4342+
crate-type = ["lib"]
4343+
4344+
[package.metadata.example.no_std_library]
4345+
name = "`no_std` Compatible Library"
4346+
description = "Example library compatible with `std` and `no_std` targets"
4347+
category = "Embedded"
4348+
wasm = true
4349+
4350+
[[example]]
4351+
name = "extended_material_bindless"
4352+
path = "examples/shader/extended_material_bindless.rs"
4353+
doc-scrape-examples = true
4354+
4355+
[package.metadata.example.extended_material_bindless]
4356+
name = "Extended Bindless Material"
4357+
description = "Demonstrates bindless `ExtendedMaterial`"
4358+
category = "Shaders"
4359+
wasm = false

assets/scenes/load_scene_example.scn.ron

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
),
66
},
77
entities: {
8-
4294967296: (
8+
4294967297: (
99
components: {
1010
"bevy_ecs::name::Name": "joe",
1111
"bevy_transform::components::global_transform::GlobalTransform": ((1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)),
@@ -23,7 +23,7 @@
2323
),
2424
},
2525
),
26-
4294967297: (
26+
4294967298: (
2727
components: {
2828
"scene::ComponentA": (
2929
x: 3.0,
@@ -32,4 +32,4 @@
3232
},
3333
),
3434
},
35-
)
35+
)

assets/shaders/custom_material.wesl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import super::shaders::util::make_polka_dots;
1+
import super::util::make_polka_dots;
22

33
struct VertexOutput {
44
@builtin(position) position: vec4<f32>,
55
@location(2) uv: vec2<f32>,
66
}
77

88
struct CustomMaterial {
9-
time: f32,
9+
// Needed for 16-bit alignment on WebGL2
10+
time: vec4<f32>,
1011
}
1112

1213
@group(2) @binding(0) var<uniform> material: CustomMaterial;
@@ -15,5 +16,5 @@ struct CustomMaterial {
1516
fn fragment(
1617
mesh: VertexOutput,
1718
) -> @location(0) vec4<f32> {
18-
return make_polka_dots(mesh.uv, material.time);
19-
}
19+
return make_polka_dots(mesh.uv, material.time.x);
20+
}

0 commit comments

Comments
 (0)