Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e8da279
WIP
makspll Nov 6, 2025
4f74fd4
more conversions
makspll Nov 7, 2025
7224f2f
change handles to AssetID's where we don't want to keep scripts alive
makspll Nov 8, 2025
be8f5f6
Merge branch 'main' into feat/bevy-0.17
makspll Nov 8, 2025
542003f
bump bevy resolution in codegen
makspll Nov 8, 2025
8d81050
bump toolchain and fix compilation errors in codegen
makspll Nov 8, 2025
6939702
fix recursion issues with crawling paths, embed linker arguments at b…
makspll Nov 9, 2025
aa42f94
fix missing external feature activations, and regen code
makspll Nov 9, 2025
791daa9
make sure not to include unstable items from newer nightlies
makspll Nov 9, 2025
a88a708
fix bug
makspll Nov 9, 2025
6fd0664
get it right
makspll Nov 9, 2025
357c2fe
fix all errors, bump bevy console, improve some path crawling stuff
makspll Nov 10, 2025
aaa9d9a
fix some test setup, add debug to dev crate features
makspll Nov 10, 2025
0b522d4
fix stack overflow
makspll Nov 11, 2025
ac99996
fix rest of tests and add missing features
makspll Nov 11, 2025
0e0037c
add wayland to init
makspll Nov 11, 2025
1fb4847
fix game of life, and some other bugs
makspll Nov 12, 2025
a08db66
fix change detection
makspll Nov 12, 2025
22cda73
some improvements
makspll Nov 12, 2025
1410f81
make sure deps in meta are sorted
makspll Nov 13, 2025
d9501a0
finally make Cargo.toml generation stable
makspll Nov 13, 2025
42d87a0
improvements to codegen + xtask
makspll Nov 19, 2025
4a030e8
import path fixes only
makspll Dec 17, 2025
6dec15c
reign in unported fix
makspll Dec 17, 2025
c18ae77
run codegen
makspll Dec 17, 2025
2e5dae5
fix tests via additional test bindings
makspll Jan 4, 2026
4b34102
cargo fmt
makspll Jan 4, 2026
64dd086
fix config
makspll Jan 4, 2026
1a9de4d
bump mdbook versions
makspll Jan 4, 2026
f778e0d
fix test
makspll Jan 4, 2026
6842bfd
free up space on runner
makspll Jan 4, 2026
7bcda56
fix
makspll Jan 4, 2026
1107941
try adjusting CI to use less memory
makspll Jan 5, 2026
7682d6b
disable grcov
makspll Jan 5, 2026
e036e30
install bencher cli
makspll Jan 5, 2026
bf4d944
try again
makspll Jan 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 11 additions & 42 deletions .github/workflows/bevy_mod_scripting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,17 @@ jobs:
matrix:
run_args: ${{fromJson(needs.generate-job-matrix.outputs.matrix)}}
steps:
# - name: Free Disk Space (Ubuntu)
# if: runner.os == 'Linux'
# uses: jlumbroso/free-disk-space@main
# with:
# tool-cache: false
# android: true
# dotnet: true
# haskell: true
# large-packages: true
# docker-images: true
# swap-storage: true
# # - if: runner.os == 'linux'
# # run: |
# # sudo rm -rf /usr/share/dotnet; sudo rm -rf /opt/ghc; sudo rm -rf "/usr/local/share/boost"; sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Free Disk Space (Ubuntu)
if: runner.os == 'Linux'
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout
if: ${{ needs.check-needs-run.outputs.any-changes == 'true' && (matrix.run_args.run_on_forks || needs.check-is-fork.outputs.is_fork != 'true') }}
uses: actions/checkout@v4
Expand Down Expand Up @@ -162,34 +159,6 @@ jobs:
run: |
xvfb-run ${{ matrix.run_args.command }}

- name: Upload coverage artifact
if: ${{ needs.check-needs-run.outputs.any-changes == 'true' && (matrix.run_args.run_on_forks || needs.check-is-fork.outputs.is_fork != 'true') && matrix.run_args.generates_coverage }}
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: target/coverage/html/

- name: Update coverage badge
if: ${{ needs.check-needs-run.outputs.any-changes == 'true' && (matrix.run_args.run_on_forks || needs.check-is-fork.outputs.is_fork != 'true') && matrix.run_args.generates_coverage }}
continue-on-error: true
run: |
git checkout -b chore/_update-coverage-badge || git checkout chore/_update-coverage-badge
cp target/coverage/html/badges/for_the_badge.svg badges/coverage.svg

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global push.autoSetupRemote true
git add badges/coverage.svg

if [[ -n $(git status -s) ]]; then
git commit -m "chore(badge): Update coverage badge" -m "[skip ci]"
git push -f
gh pr create --title "chore: Update coverage badge" --body "Updates coverage badge based on test results" --base ${{ github.ref }} --head chore/_update-coverage-badge > pr.txt
sed -n 's/.*pull\/\([0-9]*\).*/\1/p' pr.txt > pr_number.txt
PRNUMBER=$(cat pr_number.txt)
gh pr merge $PRNUMBER --squash
fi

rollup-check:
name: Required Checks Successful
needs: [check]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/synchronize_bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "changes=true" >> "$GITHUB_OUTPUT"
git diff > bindings.diff
git diff --text > bindings.diff
echo "Diff created:"
cat bindings.diff
else
Expand Down
40 changes: 38 additions & 2 deletions .github/workflows/synchronize_bindings_check_diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ jobs:
env:
DIFF_ARTIFACT: bindings.diff
PR_EVENT: event-bindings.json
EVENT_FILE: event.json
steps:
- name: Download Benchmark Results
- name: Download Diff Results
uses: dawidd6/action-download-artifact@v6
with:
name: ${{ env.DIFF_ARTIFACT }}
Expand All @@ -31,13 +32,48 @@ jobs:
with:
script: |
let fs = require('fs');
let prEvent = JSON.parse(fs.readFileSync(process.env.PR_EVENT, {encoding: 'utf8'}));
let prEvent = JSON.parse(fs.readFileSync(process.env.EVENT_FILE, {encoding: 'utf8'}));
core.exportVariable("PR_HEAD", prEvent.pull_request.head.ref);
core.exportVariable("PR_BASE", prEvent.pull_request.base.ref);
core.exportVariable("PR_BASE_SHA", prEvent.pull_request.base.sha);
core.exportVariable("PR_NUMBER", prEvent.number);
core.exportVariable("HEAD_REPO", prEvent.pull_request.head.repo.full_name);
core.exportVariable("HEAD_REPO_URL", prEvent.pull_request.head.repo.git_url);

- name: Build Collapsible Diff Comment
id: build_comment
continue-on-error: true
shell: bash
run: |
echo '### 🔍 Binding Differences Detected' > comment.md
echo '' >> comment.md
echo '> The following changes were detected in generated bindings:' >> comment.md
echo '' >> comment.md

# Build collapsible sections per file
awk '
/^diff --git/ {
if (file != "") print "</pre></details>" >> "comment.md"
file=$4
gsub(/^a\//, "", file)
print "<details><summary>" file "</summary><pre>" >> "comment.md"
next
}
{ print $0 >> "comment.md" }
END { if (file != "") print "</pre></details>" >> "comment.md" }
' "${{ env.DIFF_ARTIFACT }}"

- name: Add or Update PR Comment with Diff
id: pr_comment
continue-on-error: true
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ env.PR_NUMBER }}
body-path: comment.md
edit-mode: replace
token: ${{ secrets.GITHUB_TOKEN }}
comment-identifier: bindings-diff

- name: Fail PR With URL
uses: actions/github-script@v6
with:
Expand Down
84 changes: 49 additions & 35 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ core_functions = ["bevy_mod_scripting_functions/core_functions"]
bevy_a11y_bindings = ["bevy_mod_scripting_functions/bevy_a11y"]
bevy_animation_bindings = ["bevy_mod_scripting_functions/bevy_animation"]
bevy_asset_bindings = ["bevy_mod_scripting_functions/bevy_asset"]
bevy_camera_bindings = ["bevy_mod_scripting_functions/bevy_camera"]
bevy_color_bindings = ["bevy_mod_scripting_functions/bevy_color"]
bevy_core_pipeline_bindings = [
"bevy_mod_scripting_functions/bevy_core_pipeline",
Expand All @@ -76,17 +77,24 @@ bevy_gltf_bindings = ["bevy_mod_scripting_functions/bevy_gltf"]
bevy_image_bindings = ["bevy_mod_scripting_functions/bevy_image"]
bevy_input_bindings = ["bevy_mod_scripting_functions/bevy_input"]
bevy_input_focus_bindings = ["bevy_mod_scripting_functions/bevy_input_focus"]
bevy_light_bindings = ["bevy_mod_scripting_functions/bevy_light"]
bevy_math_bindings = ["bevy_mod_scripting_functions/bevy_math"]
bevy_mesh_bindings = ["bevy_mod_scripting_functions/bevy_mesh"]
bevy_pbr_bindings = ["bevy_mod_scripting_functions/bevy_pbr"]
bevy_picking_bindings = ["bevy_mod_scripting_functions/bevy_picking"]
bevy_post_process_bindings = ["bevy_mod_scripting_functions/bevy_post_process"]
bevy_reflect_bindings = ["bevy_mod_scripting_functions/bevy_reflect"]
bevy_render_bindings = ["bevy_mod_scripting_functions/bevy_render"]
bevy_scene_bindings = ["bevy_mod_scripting_functions/bevy_scene"]
bevy_sprite_bindings = ["bevy_mod_scripting_functions/bevy_sprite"]
bevy_sprite_render_bindings = [
"bevy_mod_scripting_functions/bevy_sprite_render",
]
bevy_text_bindings = ["bevy_mod_scripting_functions/bevy_text"]
bevy_time_bindings = ["bevy_mod_scripting_functions/bevy_time"]
bevy_transform_bindings = ["bevy_mod_scripting_functions/bevy_transform"]
bevy_ui_bindings = ["bevy_mod_scripting_functions/bevy_ui"]
bevy_ui_render_bindings = ["bevy_mod_scripting_functions/bevy_ui_render"]

# optional
unsafe_lua_modules = ["bevy_mod_scripting_lua?/unsafe_lua_modules"]
Expand Down Expand Up @@ -140,54 +148,57 @@ bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "

# bevy

bevy = { version = "0.16.0", default-features = false }
bevy_math = { version = "0.16.0", default-features = false, features = ["std"] }
bevy_transform = { version = "0.16.0", default-features = false }
bevy_reflect = { version = "0.16.0", default-features = false }
bevy_ecs = { version = "0.16.0", default-features = false }
bevy_asset = { version = "0.16.0", default-features = false }
bevy_app = { version = "0.16.0", default-features = false }
bevy_log = { version = "0.16.0", default-features = false }
bevy_internal = { version = "0.16.0", default-features = false }
bevy_diagnostic = { version = "0.16.0", default-features = false }
bevy_platform = { version = "0.16.0", default-features = false }
bevy_time = { version = "0.16.0", default-features = false }
bevy_input = { version = "0.16.0", default-features = false }
bevy_a11y = { version = "0.16.0", default-features = false, features = [

bevy = { version = "0.17", default-features = false }
bevy_math = { version = "0.17", default-features = false, features = ["std"] }
bevy_transform = { version = "0.17", default-features = false }
bevy_reflect = { version = "0.17", default-features = false }
bevy_ecs = { version = "0.17", default-features = false }
bevy_asset = { version = "0.17", default-features = false }
bevy_app = { version = "0.17", default-features = false }
bevy_log = { version = "0.17", default-features = false }
bevy_internal = { version = "0.17", default-features = false }
bevy_diagnostic = { version = "0.17", default-features = false }
bevy_platform = { version = "0.17", default-features = false }
bevy_time = { version = "0.17", default-features = false }
bevy_input = { version = "0.17", default-features = false }
bevy_a11y = { version = "0.17", default-features = false, features = [
"std",
"bevy_reflect",
] }
bevy_animation = { version = "0.16.0", default-features = false }
bevy_color = { version = "0.16.0", default-features = false, features = [
bevy_animation = { version = "0.17", default-features = false }
bevy_color = { version = "0.17", default-features = false, features = [
"std",
"bevy_reflect",
] }
bevy_core_pipeline = { version = "0.16.0", default-features = false }
bevy_gizmos = { version = "0.16.0", default-features = false }
bevy_gltf = { version = "0.16.0", default-features = false }
bevy_image = { version = "0.16.0", default-features = false, features = [
bevy_core_pipeline = { version = "0.17", default-features = false }
bevy_gizmos = { version = "0.17", default-features = false }
bevy_gltf = { version = "0.17", default-features = false }
bevy_image = { version = "0.17", default-features = false, features = [
"bevy_reflect",
] }
bevy_input_focus = { version = "0.16.0", default-features = false, features = [
bevy_input_focus = { version = "0.17", default-features = false, features = [
"std",
"bevy_reflect",
] }
bevy_mesh = { version = "0.16.0", default-features = false }
bevy_pbr = { version = "0.16.0", default-features = false }
bevy_picking = { version = "0.16.0", default-features = false }
bevy_render = { version = "0.16.0", default-features = false }
bevy_scene = { version = "0.16.0", default-features = false }
bevy_sprite = { version = "0.16.0", default-features = false }
bevy_text = { version = "0.16.0", default-features = false }
bevy_window = { version = "0.16.0", default-features = false, features = [
bevy_mesh = { version = "0.17", default-features = false }
bevy_pbr = { version = "0.17", default-features = false }
bevy_picking = { version = "0.17", default-features = false }
bevy_render = { version = "0.17", default-features = false }
bevy_scene = { version = "0.17", default-features = false }
bevy_sprite = { version = "0.17", default-features = false }
bevy_text = { version = "0.17", default-features = false }
bevy_window = { version = "0.17", default-features = false, features = [
"bevy_reflect",
"std",
] }
bevy_winit = { version = "0.16.0", default-features = false }
bevy_winit = { version = "0.17", default-features = false }
bevy_utils = { version = "0.17", default-features = false, features = ["std"] }

glam = { version = "0.29.3", default-features = false }
uuid = { version = "1.11", default-features = false }
glam = { version = "0.30.7", default-features = false }
uuid = { version = "1.13", default-features = false }
smol_str = { version = "0.2.0", default-features = false }
nonmax = { version = "0.5", default-features = false, features = ["std"] }

# other
serde_json = { version = "1.0", default-features = false }
Expand All @@ -204,8 +215,8 @@ rhai = { version = "1.21", default-features = false }
mlua = { version = "0.10", default-features = false }
log = { version = "0.4", default-features = false }
env_logger = { version = "0.11", default-features = false }
clap = { version = "4", default-features = false }
mdbook = { version = "0.4", default-features = false }
clap = { version = "4", default-features = false, features = ["std"] }
mdbook-preprocessor = { version = "0.5", default-features = false }
quote = { version = "1.0", default-features = false }
syn = { version = "2.0", default-features = false }
proc-macro2 = { version = "1.0", default-features = false }
Expand All @@ -224,7 +235,7 @@ pretty_assertions = { version = "1.4", default-features = false, features = [
manifest-dir-macros = { version = "0.1.18", default-features = false }
assert_cmd = { version = "2.1", default-features = false }
tokio = { version = "1", default-features = false }
bevy_console = { version = "0.14", default-features = false }
bevy_console = { version = "0.16", default-features = false }
tracing-tracy = { version = "0.11", default-features = false }
libtest-mimic = { version = "0.8", default-features = false }
criterion = { version = "0.5", default-features = false }
Expand All @@ -238,10 +249,13 @@ bevy = { workspace = true, features = [
"bevy_asset",
"bevy_core_pipeline",
"bevy_sprite",
"bevy_sprite_render",
"bevy_state",
"x11",
"bevy_ui",
"default_font",
"custom_cursor",
"debug",
] }
bevy_platform = { workspace = true }
clap = { workspace = true, features = ["derive"] }
Expand Down
13 changes: 6 additions & 7 deletions assets/scripts/game_of_life.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ LifeState = world.get_type_by_name("LifeState")
Settings = world.get_type_by_name("Settings")

info("Lua: The game_of_life.lua script just got loaded")

math.randomseed(os.time())

function fetch_life_state()
Expand Down Expand Up @@ -37,11 +36,11 @@ function on_click(x, y)
local dimensions = settings.physical_grid_dimensions
local screen = settings.display_grid_dimensions

local dimension_x = dimensions._1
local dimension_y = dimensions._2
local dimension_x = dimensions[1]
local dimension_y = dimensions[2]

local screen_x = screen._1
local screen_y = screen._2
local screen_x = screen[1]
local screen_y = screen[2]

local cell_width = screen_x / dimension_x
local cell_height = screen_y / dimension_y
Expand Down Expand Up @@ -78,8 +77,8 @@ function on_update()
local cells = fetch_life_state().cells
local settings = world.get_resource(Settings)
local dimensions = settings.physical_grid_dimensions
local dimension_x = dimensions._1
local dimension_y = dimensions._2
local dimension_x = dimensions[1]
local dimension_y = dimensions[2]

-- primitives are passed by value to lua, keep a hold of old state but turn 255's into 1's
local prev_state = {}
Expand Down
12 changes: 6 additions & 6 deletions assets/scripts/game_of_life.rhai
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ fn on_click(x,y) {
let dimensions = settings.physical_grid_dimensions;
let screen = settings.display_grid_dimensions;

let dimension_x = dimensions["_0"];
let dimension_y = dimensions["_1"];
let dimension_x = dimensions[0];
let dimension_y = dimensions[1];

let screen_x = screen["_0"];
let screen_y = screen["_1"];
let screen_x = screen[0];
let screen_y = screen[1];

let cell_width = screen_x / dimension_x;
let cell_height = screen_y / dimension_y;
Expand Down Expand Up @@ -77,8 +77,8 @@ fn on_update() {
// note that here we do not make use of RhaiProxyable and just go off pure reflection
let settings = world.get_resource.call(Settings);
let dimensions = settings.physical_grid_dimensions;
let dimension_x = dimensions["_0"];
let dimension_y = dimensions["_1"];
let dimension_x = dimensions[0];
let dimension_y = dimensions[1];

// primitives are passed by value to rhai, keep a hold of old state but turn 255's into 1's
let prev_state = [];
Expand Down
4 changes: 2 additions & 2 deletions assets/tests/access/multiple_read_refs.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
local entity = Entity.from_raw(9999);
local entity = _make_invalid_entity();
-- does not throw
entity:eq(entity);
entity:eq(entity);
2 changes: 1 addition & 1 deletion assets/tests/access/multiple_read_refs.rhai
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
let entity = Entity.from_raw.call(9999);
let entity = _make_invalid_entity.call();
// does not throw
let out = entity.eq.call(entity);
2 changes: 1 addition & 1 deletion assets/tests/add_system/added_systems_run_in_parallel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ digraph {
node_16 [label="on_test_post_update"];
node_17 [label="custom_system_a"];
node_18 [label="custom_system_b"];
node_19 [label="SystemSet AssetEvents"];
node_19 [label="SystemSet AssetEventSystems"];
node_20 [label="SystemSet GarbageCollection"];
node_21 [label="SystemSet ListeningPhase"];
node_22 [label="SystemSet MachineStartPhase"];
Expand Down
2 changes: 1 addition & 1 deletion assets/tests/add_system/added_systems_run_in_parallel.rhai
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ digraph {
node_16 [label="on_test_post_update"];
node_17 [label="custom_system_a"];
node_18 [label="custom_system_b"];
node_19 [label="SystemSet AssetEvents"];
node_19 [label="SystemSet AssetEventSystems"];
node_20 [label="SystemSet GarbageCollection"];
node_21 [label="SystemSet ListeningPhase"];
node_22 [label="SystemSet MachineStartPhase"];
Expand Down
Loading
Loading