Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Litttlefish authored Sep 23, 2024
2 parents 3d97559 + 9386bd0 commit 54229b0
Show file tree
Hide file tree
Showing 382 changed files with 10,579 additions and 3,786 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,15 @@ jobs:
components: miri
- name: CI job
# To run the tests one item at a time for troubleshooting, use
# cargo --quiet test --lib -- --list | sed 's/: test$//' | MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-permissive-provenance -Zmiri-disable-weak-memory-emulation" xargs -n1 cargo miri test -p bevy_ecs --lib -- --exact
# cargo --quiet test --lib -- --list | sed 's/: test$//' | MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-disable-weak-memory-emulation" xargs -n1 cargo miri test -p bevy_ecs --lib -- --exact
run: cargo miri test -p bevy_ecs
env:
# -Zrandomize-layout makes sure we dont rely on the layout of anything that might change
RUSTFLAGS: -Zrandomize-layout
# https://github.com/rust-lang/miri#miri--z-flags-and-environment-variables
# -Zmiri-disable-isolation is needed because our executor uses `fastrand` which accesses system time.
# -Zmiri-permissive-provenance disables warnings against int2ptr casts (since those are used by once_cell)
# -Zmiri-ignore-leaks is necessary because a bunch of tests don't join all threads before finishing.
MIRIFLAGS: -Zmiri-ignore-leaks -Zmiri-disable-isolation -Zmiri-permissive-provenance
MIRIFLAGS: -Zmiri-ignore-leaks -Zmiri-disable-isolation

check-compiles:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -420,19 +419,19 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Check for bevy_internal imports
- name: Check for internal Bevy imports
shell: bash
run: |
errors=""
for file in $(find examples tests -name '*.rs'); do
if grep -q "use bevy_internal" "$file"; then
errors+="ERROR: Detected 'use bevy_internal' in $file\n"
if grep -q "use bevy_" "$file"; then
errors+="ERROR: Detected internal Bevy import in $file\n"
fi
done
if [ -n "$errors" ]; then
echo -e "$errors"
echo " Avoid importing bevy_internal, it should not be used directly"
echo " Fix the issue by replacing 'bevy_internal' with 'bevy'"
echo " Avoid importing internal Bevy crates, they should not be used directly"
echo " Fix the issue by replacing 'bevy_*' with 'bevy'"
echo " Example: 'use bevy::sprite::MaterialMesh2dBundle;' instead of 'bevy_internal::sprite::MaterialMesh2dBundle;'"
exit 1
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Cargo.lock
.cargo/config.toml
/.idea
/.vscode
.zed
/benches/target
/tools/compile_fail_utils/target
dxcompiler.dll
Expand Down
51 changes: 49 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords = ["game", "engine", "gamedev", "graphics", "bevy"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/bevyengine/bevy"
documentation = "https://docs.rs/bevy"
rust-version = "1.79.0"
rust-version = "1.81.0"

[workspace]
exclude = [
Expand Down Expand Up @@ -68,6 +68,8 @@ default = [
"bevy_core_pipeline",
"bevy_pbr",
"bevy_picking",
"bevy_sprite_picking_backend",
"bevy_ui_picking_backend",
"bevy_gltf",
"bevy_render",
"bevy_sprite",
Expand All @@ -88,6 +90,12 @@ default = [
"android-game-activity",
]

# Provides an implementation for picking sprites
bevy_sprite_picking_backend = ["bevy_picking"]

# Provides an implementation for picking ui
bevy_ui_picking_backend = ["bevy_picking"]

# Force dynamic linking, which improves iterative compile times
dynamic_linking = ["dep:bevy_dylib", "bevy_internal/dynamic_linking"]

Expand Down Expand Up @@ -142,6 +150,7 @@ bevy_sprite = [
"bevy_render",
"bevy_core_pipeline",
"bevy_color",
"bevy_sprite_picking_backend",
]

# Provides text functionality
Expand All @@ -154,6 +163,7 @@ bevy_ui = [
"bevy_text",
"bevy_sprite",
"bevy_color",
"bevy_ui_picking_backend",
]

# winit window and input backend
Expand All @@ -165,6 +175,9 @@ bevy_gizmos = ["bevy_internal/bevy_gizmos", "bevy_color"]
# Provides a collection of developer tools
bevy_dev_tools = ["bevy_internal/bevy_dev_tools"]

# Enable passthrough loading for SPIR-V shaders (Only supported on Vulkan, shader capabilities and extensions must agree with the platform implementation)
spirv_shader_passthrough = ["bevy_internal/spirv_shader_passthrough"]

# Tracing support, saving a file in Chrome Tracing format
trace_chrome = ["trace", "bevy_internal/trace_chrome"]

Expand Down Expand Up @@ -1361,6 +1374,28 @@ category = "Application"
wasm = false

# Assets
[[example]]
name = "alter_mesh"
path = "examples/asset/alter_mesh.rs"
doc-scrape-examples = true

[package.metadata.example.alter_mesh]
name = "Alter Mesh"
description = "Shows how to modify the underlying asset of a Mesh after spawning."
category = "Assets"
wasm = false

[[example]]
name = "alter_sprite"
path = "examples/asset/alter_sprite.rs"
doc-scrape-examples = true

[package.metadata.example.alter_sprite]
name = "Alter Sprite"
description = "Shows how to modify texture assets after spawning."
category = "Assets"
wasm = false

[[example]]
name = "asset_loading"
path = "examples/asset/asset_loading.rs"
Expand Down Expand Up @@ -3273,7 +3308,6 @@ description = "Shows how to orbit a static scene using pitch, yaw, and roll."
category = "Camera"
wasm = true


[package.metadata.example.fps_overlay]
name = "FPS overlay"
description = "Demonstrates FPS overlay"
Expand Down Expand Up @@ -3442,12 +3476,14 @@ wasm = true
name = "sprite_picking"
path = "examples/picking/sprite_picking.rs"
doc-scrape-examples = true
required-features = ["bevy_sprite_picking_backend"]

[package.metadata.example.sprite_picking]
name = "Sprite Picking"
description = "Demonstrates picking sprites and sprite atlases"
category = "Picking"
wasm = true
required-features = ["bevy_sprite_picking_backend"]

[[example]]
name = "animation_masks"
Expand All @@ -3460,6 +3496,17 @@ description = "Demonstrates animation masks"
category = "Animation"
wasm = true

[[example]]
name = "pcss"
path = "examples/3d/pcss.rs"
doc-scrape-examples = true

[package.metadata.example.pcss]
name = "Percentage-closer soft shadows"
description = "Demonstrates percentage-closer soft shadows (PCSS)"
category = "3D Rendering"
wasm = false

[profile.wasm-release]
inherits = "release"
opt-level = "z"
Expand Down
Binary file added assets/environment_maps/sky_skybox.ktx2
Binary file not shown.
Binary file added assets/models/PalmTree/PalmTree.bin
Binary file not shown.
Loading

0 comments on commit 54229b0

Please sign in to comment.